Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use with RabbitMq #25

Open
adeptmatt opened this issue Nov 25, 2019 · 3 comments
Open

Use with RabbitMq #25

adeptmatt opened this issue Nov 25, 2019 · 3 comments

Comments

@adeptmatt
Copy link

Hi guys,

I am in a massive rabbit hole here (pun intended).

I am trying to implemented an anonymous sender and dynamic receiver. My test program works with ActiveMQ but we use Rabbit in production. I went on a wild goose chase to find that you need to enable the amqp1.0 plugin in RabbitMQ - I would suggest possibly documenting this somewhere? It could hopefully save someone a few hours.

After successfully establishing a connection to my RabbitMQ server I noticed that "createAnonymousSender" and "createDynamicReceiver" both seem to suffer from an exception being thrown, they don't call my handler for success / error. I registered an exception handler and found that this gets thrown:

java.lang.Exception: Connection disconnected
	at io.vertx.amqp.impl.AmqpConnectionImpl.onDisconnect(AmqpConnectionImpl.java:135)
	at io.vertx.amqp.impl.AmqpConnectionImpl.lambda$null$2(AmqpConnectionImpl.java:98)
	at io.vertx.proton.impl.ProtonConnectionImpl.lambda$getDefaultSession$6(ProtonConnectionImpl.java:263)
	at io.vertx.proton.impl.ProtonSessionImpl.fireRemoteClose(ProtonSessionImpl.java:276)
	at io.vertx.proton.impl.ProtonTransport.handleSocketBuffer(ProtonTransport.java:130)
	at io.vertx.core.net.impl.NetSocketImpl$DataMessageHandler.handle(NetSocketImpl.java:386)
	at io.vertx.core.net.impl.NetSocketImpl.lambda$new$2(NetSocketImpl.java:101)
	at io.vertx.core.streams.impl.InboundBuffer.handleEvent(InboundBuffer.java:237)
	at io.vertx.core.streams.impl.InboundBuffer.write(InboundBuffer.java:127)

I managed to dig a little deeper and things started pointing at Rabbit, I looked in the logs and found this:

Closing session for connection <0.671.0>:
{'v1_0.error',{symbol,<<"amqp:invalid-field">>},
              {utf8,<<"Attach rejected: {address_not_utf8_string,undefined}">>},
              undefined}

I've kind of hit a dead-end now though. I am not sure if this is a configuration problem on Rabbit or something in the library?

Let me know if I can provide anything more to assist.

@vietj
Copy link
Contributor

vietj commented Nov 25, 2019

can you provide a reproducer project @adeptmatt ?

@adeptmatt
Copy link
Author

adeptmatt commented Nov 25, 2019

Sure,

https://github.com/adeptmatt/vertxamqprabbit

To reproduce:

  • install rabbitmq-server
  • install the rabbit amqp1.0 plugin
rabbitmq-plugins enable rabbitmq_amqp1_0
  • restart rabbitmq-server
  • set the url of your rabbitmq-server in my verticle
  • run

Ps. The log I referenced earlier is located in /var/log/rabbitmq/

@gemmellr
Copy link
Contributor

I dont believe RabbitMQ supports either basic dynamic sources (required to create a dynamic receiver), or the layered anonymous-relay extension mechanism needed for anonymous producer links, so those calls simply wont work against it in that case.

The error you posted is presumably around the latter, where a link is established with no target address specified in order to signify the anonymous relay node, and in not supporting that the broker then killed the session (rather than just rejecting the link).

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

No branches or pull requests

3 participants