How to Consume AMQP message from ActiveMQ based on CooreltionID with vertx-amqp-bridge?

265 views
Skip to first unread message

Rengaswamy Marimuthu

unread,
Sep 20, 2017, 4:42:52 AM9/20/17
to vert.x
I am able to filter JMS messages from ActiveMQ like as follows as  with official activemq-broker  java library 

//specific filter
String jmsSelector = "JMSCorrelationID = \'"myid\'";
// Create a MessageConsumer from the Session to the Topic or Queue
MessageConsumer consumer = session.createConsumer(destination, jmsSelector);



Now I am trying to do the same with vertx-amqp-bridge using AMQP protocol . Since the the correlation id is part of the header. I can 

JsonObject amqpMsgPayload = vertxMsg.body();
JsonObject header = (JsonObject) amqpMsgPayload.getValue(AmqpConstants.PROPERTIES);
String corelationIc= header.getString(AmqpConstants.PROPERTIES_CORRELATION_ID);


if I do this the message disappears from the Queue. 

How can I filter messages before consuming with vertx-amqp-bridge?

Robbie Gemmell

unread,
Sep 30, 2017, 7:14:49 AM9/30/17
to ve...@googlegroups.com
The amqp-bridge can't currently do that, it would need to be augmented
to facilitate adding a particular 'source filter' with selector
details when creating the underlying consumer link with the broker.

It should be possible to do that already with the vertx-proton
component over which vertx-amqp-bridge builds, albeit with a bit of
juggling. I could put an example of that together during the week if
it would be useful for you.

Robbie

On 20 September 2017 at 09:42, Rengaswamy Marimuthu
> --
> You received this message because you are subscribed to the Google Groups
> "vert.x" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vertx+un...@googlegroups.com.
> Visit this group at https://groups.google.com/group/vertx.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/vertx/ecc1d2f2-cdd3-47e7-8da5-7195d2194ee2%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages