Azure / azure-service-bus

☁️ Azure Service Bus service issue tracking and samples
https://azure.microsoft.com/services/service-bus
MIT License
585 stars 776 forks source link

Can Azure Service Bus support session enabled queue/subs via JMS API? #444

Closed yiliuTo closed 2 years ago

yiliuTo commented 3 years ago

Description

From the unsupported-features-and-restrictions section for using JMS with Service Bus, it's declared that setting MessageSelector via jms is not supported, while MessageSelector results in the filter property of an AMQP frame which is used by Service Bus for session enabled queue/subs, thus does it also mean that I cannot use JMS to receive messages from session enabled queues?

Here are the details I found, when using Service Bus sessions, it requires an AMQP message's filter as com.microsoft:session-filter, however, when using JMS's selector, the filter has been hard-coded as "jms-selector", so seems using JMS cannot receive messages from session enable queues.

Is it possible that the feature can be supported via JMS?

Actual Behavior

  1. When using azure-messaging-servicebus client to for session enabled queues, the related AMQP frame is as below

image

  1. However when using JMS and set a selector as "Group-Id = 'test'", the AMQP frame is

image

which then resulted in the error mentioned in #326.

Expected Behavior

Message session feature can be supported with JMS selector.

vmuthusamy-nlg commented 2 years ago

I'm also running into a similar error while trying to consume messages from session-enabled queues using camel-amqp (2.23.x) component in the spring boot application. Is this feature supported using JMS API ?

o.a.q.j.p.a.b.AmqpResourceBuilder - Open of resource:(JmsConsumerInfo: { ID:xxxxxxxxxxxxxxxx-xxxxxxxx:6:1:1, destination = queue-5 }) failed: It is not possible for an entity that requires sessions to create a non-sessionful message receiver.

abhikt48 commented 2 years ago

+1

it will be great if we have this feature via JMS APi..

clemensv commented 2 years ago

The JMS API does not support our session model, unfortunately. We can only work with what we get as the standard interface.