Regarding Solace message consumption using AMQP

I’m building a connector to Solace using AMQP via Qpid JMS, so that I can support other brokers in the future.

  1. When I consume messages through AMQP, I am unable to access the Solace Replication Group Message ID (which is used for deduplication in Solace). Why is this?

  2. The JMSMessageID I receive from messages consumed from a Solace queue (using AMQP) is it guaranteed to be unique every time? Since I read that it’s optional in AMQP docs, is there a scenario where Solace might not provide JMSMessageID at all?
    If not what property should I consider as unique id for each event?

Hi there, I’m Solly AI, I generate responses to your questions using the power of the Solace Agent Mesh:

Please remember that AI technology can make mistakes so ensure that you read our Disclaimer.

AI Generated responses are a work in progress, your help in evaluating my response would be awesome! If my response makes sense, please mark it as a solution or give a :+1:. If my response doesn’t make sense for your topic, please react to it with a :shaking_face:.

Let me analyze each part of your multi-part question about AMQP via Qpid JMS:

  1. Why can’t I access the Solace Replication Group Message ID when consuming messages?
    The documentation shows that Replication Group Message ID is a Solace-specific message identifier set by the event broker, and it is not exposed through the standard AMQP protocol or JMS interfaces. This is because AMQP follows a standardized protocol specification that doesn’t include Solace-specific message properties.

  2. Is the JMSMessageID guaranteed to be unique?
    The documentation does not explicitly state whether JMSMessageID is guaranteed to be unique. Since this is an AMQP implementation following the JMS specification, the uniqueness guarantees would be defined by the JMS spec rather than Solace-specific behavior.

  3. Are there scenarios where Solace might not provide JMSMessageID?
    The documentation does not explicitly state scenarios where JMSMessageID might not be provided. This would be governed by the JMS specification rather than Solace-specific behavior.

  4. What property should be used as a unique ID for each event?
    Based on the documentation, there are several ID options but no explicit recommendation for which one to use as a unique identifier:

  • JMSMessageID (application-settable free-text string)
  • Replication Group Message ID (set by broker, used for replay and DMR)
  • Broker Message ID (automatically assigned by broker)

The choice depends on your specific requirements for uniqueness and scope.

Relevant sources:

Okay .
I’m trying to consume messages from a non-exclusive queue (with 4 partition) in Solace PubSub+ Cloud using AMQP 1.0 (Qpid JMS library).

My goal is to increase message consumption throughput by running multiple threads, each creating its own AMQP connection and consumer to the same queue.

Here’s the structure:

  • 5 threads

  • Each thread creates its own Connection, Session, and MessageConsumer for the same queue (sinchana-queue-nonExclusive)

  • Queue is non-exclusive with 4 partition

But I’m getting the following error for all consumers:

SMF AD bind response error [condition = amqp:internal-error]

I am able to produce message to this non-exclusive queue but not able to consume.
also I am able to consume and produce for any exclusive queue using AMQP.
Why I am not able to get message from non-exclusive queue?

Hi, the error stems from the fact that the Solace broker does not support the use of AMQP with partitioned queues. Please note that non-exclusive queues with several consumers work perfectly fine (no. of partitions = 0).

For partitioned queues consumption will only work with the SMF protocol (= Solace clients). They also require a partition key for each message on the producer side.

So if you just want to increase throughput a non-partitioned + non-exclusive queue should work. The downside is that message order will not be preserved.

1 Like