AMQPException at createConsumer on Azure topic

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

AMQPException at createConsumer on Azure topic

uvaraj
This post was updated on .
Getting exception @ the line Session.createConsumer(source, 400, QoS.EXACTLY_ONCE, true, null);

I am using microsoft Azure servicebus topic to receive amqp messages.
Port: 5671

Can somebody explain me why this exception is happening. How to resolve this.

exception details,

com.swiftmq.amqp.v100.client.AMQPException: Invalid destination
SessionDispatcherFrameVisitor, , visit=[Attach name=-6328945577288310738/2/out/t0000/Subscriptions/s0000/0, handle=0, role=FALSE, sndSettleMode=2, rcvSettleMode=0, incompleteUnsettled=FALSE, initialDeliveryCount=0, maxMessageSize=266240]
SessionDispatcher, channel=0, , visit, po=[POConnectionFrameReceived, frame=[Attach name=-6328945577288310738/2/out/t0000/Subscriptions/s0000/0, handle=0, role=FALSE, sndSettleMode=2, rcvSettleMode=0, incompleteUnsettled=FALSE, initialDeliveryCount=0, maxMessageSize=266240]] done
       at com.swiftmq.amqp.v100.client.Session.createConsumer(Unknown Source)
       at com.swiftmq.amqp.v100.client.Session.createConsumer(Unknown Source)      
SessionDispatcher, channel=0, , visit, po=[POConnectionFrameReceived, frame=[Detach handle=0, closed=TRUE, error=[Error condition=amqp:not-allowed, description=The link 'G38:12098484:-6328945577288310738/2/out/t0000/Subscriptions/s0000/0' contains invalid filter type. System only support Jms or Apache selector filter type but we found type 'Microsoft.ServiceBus.Messaging.Amqp.Encoding.DescribedType' associated with key 'no-local-filter'. TrackingId:b7261196-3dfd-49de-a821-1aa24c9ba702_B31,TimeStamp:7/22/2015 7:30:38 AM]]]
Reply | Threaded
Open this post in threaded view
|

Re: AMQPException at createConsumer on Azure topic

IIT Software
Administrator
This should be self explaining. You are using a wrong filter. Use a JMS message selector instead.
Reply | Threaded
Open this post in threaded view
|

Re: AMQPException at createConsumer on Azure topic

uvaraj
This post was updated on .
now i updated as Consumer c = receiverSession.createConsumer(source, 400, QoS.EXACTLY_ONCE, true, "JMS");

but received different exception.

amqp, RCV[0] (size=93): [Attach name=-2273539409280712650/2/out/t0000/Subscriptions/s0000/0, handle=0, role=FALSE, sndSettleMode=2, rcvSettleMode=0, incompleteUnsettled=FALSE, initialDeliveryCount=0, maxMessageSize=266240]
com.swiftmq.amqp.v100.client.AMQPException: Invalid destination
SessionDispatcher, channel=0, , visit, po=[POConnectionFrameReceived, frame=[Attach name=-2273539409280712650/2/out/t0000/Subscriptions/s0000/0, handle=0, role=FALSE, sndSettleMode=2, rcvSettleMode=0, incompleteUnsettled=FALSE, initialDeliveryCount=0, maxMessageSize=266240]] ...
SessionDispatcherFrameVisitor, , visit=[Attach name=-2273539409280712650/2/out/t0000/Subscriptions/s0000/0, handle=0, role=FALSE, sndSettleMode=2, rcvSettleMode=0, incompleteUnsettled=FALSE, initialDeliveryCount=0, maxMessageSize=266240]
SessionDispatcher, channel=0, , visit, po=[POConnectionFrameReceived, frame=[Attach name=-2273539409280712650/2/out/t0000/Subscriptions/s0000/0, handle=0, role=FALSE, sndSettleMode=2, rcvSettleMode=0, incompleteUnsettled=FALSE, initialDeliveryCount=0, maxMessageSize=266240]] done
        at com.swiftmq.amqp.v100.client.Session.createConsumer(Unknown Source)
        at com.swiftmq.amqp.v100.client.Session.createConsumer(Unknown Source)
amqp, RCV[0] (size=303): [Detach handle=0, closed=TRUE, error=[Error condition=amqp:not-allowed, description=The link 'G50:1379097:-2273539409280712650/2/out/t0000/Subscriptions/s0000/0' contains invalid number of amqp filters. There should only be 1 filter in the filter set. TrackingId:4e8fb2f2-7e51-4501-809d-12dbbc02e29d_B16,TimeStamp:7/23/2015 12:06:51 PM]]
SessionDispatcher, channel=0, , visit, po=[POConnectionFrameReceived, frame=[Detach handle=0, closed=TRUE, error=[Error condition=amqp:not-allowed, description=The link 'G50:1379097:-2273539409280712650/2/out/t0000/Subscriptions/s0000/0' contains invalid number of amqp filters. There should only be 1 filter in the filter set. TrackingId:4e8fb2f2-7e51-4501-809d-12dbbc02e29d_B16,TimeStamp:7/23/2015 12:06:51 PM]]] ...
SessionDispatcherFrameVisitor, , visit=[Detach handle=0, closed=TRUE, error=[Error condition=amqp:not-allowed, description=The link 'G50:1379097:-2273539409280712650/2/out/t0000/Subscriptions/s0000/0' contains invalid number of amqp filters. There should only be 1 filter in the filter set. TrackingId:4e8fb2f2-7e51-4501-809d-12dbbc02e29d_B16,TimeStamp:7/23/2015 12:06:51 PM]]
SessionDispatcher, channel=0, , visit, po=[POConnectionFrameReceived, frame=[Detach handle=0, closed=TRUE, error=[Error condition=amqp:not-allowed, description=The link 'G50:1379097:-2273539409280712650/2/out/t0000/Subscriptions/s0000/0' contains invalid number of amqp filters. There should only be 1 filter in the filter set. TrackingId:4e8fb2f2-7e51-4501-809d-12dbbc02e29d_B16,TimeStamp:7/23/2015 12:06:51 PM]]] done

[update]
If  I use,
receiverSession.createConsumer(source, 400, QoS.EXACTLY_ONCE, false, null); "NoLocal" flag = false
Im not getting the "system only supports only JMS or Apache ..."

if i use,
receiverSession.createConsumer(source, 400, QoS.EXACTLY_ONCE, true, "JMS"); "NoLocal" flag = true
getting exception as,
com.swiftmq.amqp.v100.client.AMQPException: Invalid destination
        at com.swiftmq.amqp.v100.client.Session.createConsumer(Unknown Source)
 bytes.length=21  [AMQPType name=symbol, code=0xa3, constructor=null]], bytes.length=156  [AMQPType name=string, code=0xa1, constructor=null]]] ...
Reply | Threaded
Open this post in threaded view
|

Re: AMQPException at createConsumer on Azure topic

IIT Software
Administrator
Can you set

-Dswiftmq.amqp.frame.debug=true

on your client's command line, please.

Then run this case

receiverSession.createConsumer(source, 400, QoS.EXACTLY_ONCE, false, null); "NoLocal" flag = false

There will be an Attach frame sent to SB. Please send me the output.
Reply | Threaded
Open this post in threaded view
|

Re: AMQPException at createConsumer on Azure topic

uvaraj
Output.txt

have uploaded the output after setting
-Dswiftmq.amqp.frame.debug=true
-Dswiftmq.amqp.debug=true
Reply | Threaded
Open this post in threaded view
|

Re: AMQPException at createConsumer on Azure topic

IIT Software
Administrator
Looks fine. I don't see any exceptions. Your consumer waits for messages. ;-)
Reply | Threaded
Open this post in threaded view
|

Re: AMQPException at createConsumer on Azure topic

uvaraj
[No exception for below api call]
receiverSession.createConsumer(source, 400, QoS.EXACTLY_ONCE, false, null); "NoLocal" flag = false

[Exception occurs for the below api - Supports only JMS or apache message selector]
receiverSession.createConsumer(source, 400, QoS.EXACTLY_ONCE, true, null); "NoLocal" flag = true

I want to understand how does the no local filter = true can cause these exceptions? it gives exception even if i set message selector as "JMS".

Another question, how important is the message selector?

I am newbie to these. Please explain in detail or give me some links to read more.

Reply | Threaded
Open this post in threaded view
|

Re: AMQPException at createConsumer on Azure topic

IIT Software
Administrator
The noLocal flag states that you don't want to receive messages that were sent from the same connection. That is, if you have a subscription where you send and receive from, you don't want to receive your own messages.

Internal this flag translates into an AMQP filter which is sent to the broker (SB in your case). It seems that SB does not support the no-local-filter so you can't set it.

A message selector is required if you don't want to receive all messages from a subscription. You can select the messages were you are interested in through a JMS message selector (e.g. "orderid between 10 and 20"). So just don't specify a message selector (set it to null) and you should get all messages sent to this subscription.