Skip to content

WIP to make AMQP EventSource work#1

Open
sjwoodman wants to merge 1 commit intocliffjansen:masterfrom
sjwoodman:master
Open

WIP to make AMQP EventSource work#1
sjwoodman wants to merge 1 commit intocliffjansen:masterfrom
sjwoodman:master

Conversation

@sjwoodman
Copy link
Copy Markdown

DO NOT MERGE

I think I've managed to get the AMQP EventSouce to work. Some notes/comments.

In the logs I see some empty CloudEvents so I assume there are some empty AMQP messages being delivered.

$ oc logs message-dumper-00001-deployment-84fb6985-4l76j -c user-container -f
2018/11/27 12:39:11 Message Dumper received a message: POST / HTTP/1.1
Host: message-dumper.myproject.svc.cluster.local
Accept-Encoding: gzip
Ce-Cloudeventsversion: 0.1
Ce-Eventid: 11
Ce-Eventtime: 2018-11-27T12:39:11.286081311Z
Ce-Eventtype: amqp.delivery
Ce-Source: some_canon_amqpaddr_rep_TODO
Content-Length: 2
Content-Type: application/json
User-Agent: Go-http-client/1.1
X-B3-Parentspanid: a01f00e8958b26fa
X-B3-Sampled: 1
X-B3-Spanid: 3bb2bff992beb6d9
X-B3-Traceid: a01f00e8958b26fa
X-Forwarded-For: 127.0.0.1
X-Forwarded-Proto: http
X-Request-Id: c46f4a11-5cf2-9712-b6b1-6da428aba115

{}
  • I had to edit the Dockerfile as Docker in my minishift is not new enough to support Staged Builds and I'm not sure how to update it. You probably don't want to merge this...
  • I had to push the adaptor image to DockerHub to get it to deploy. I'm not sure why but simply tagging it locally didn't want to work. I suspect the ContainerSource may have a property of ImagePullPolicy: Always which will only work, I think, with images in a remote repo.
  • I used the https://github.com/vromero/activemq-artemis-docker container as a Broker as it was easier to setup than AMQ Broker (from the instructions I found). oc new-app --name=artemis vromero/activemq-artemis -e RESTORE_CONFIGURATION=true
  • I didn't actually send any AMQP messages but given the logs I think it's working
  • The issue was with the address of the Broker so I changed it to the structure that has worked for Kafka which is the fully-qualified service name
  • There are sample files in /samples' which I used with oc apply -f` to bring everything up

@sjwoodman
Copy link
Copy Markdown
Author

I checked the ContainerSource and it has IfNotPresent for PullPolicy so I'm not sure why I couldn't get it to pull from the local repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant