Hello,

I'm attempting to use Qpid JMS to connect to an AMQP 1.0 server (namely
Azure Event Hubs). To be able to start consuming messages at a certain
offset I have to set a message filter.

The filters reads like this:
    amqp.annotation.x-opt-offset > '100'

When setting the filter using
    session.createConsumer(
      destination,
      "amqp.annotation.x-opt-offset > '100'"
    )
an InvalidSelectorException gets thrown.

This is due to the Qpid library checking [1] the filter against a
grammar defined in SelectorParserImpl.jj [2].

It appears like there is no way around this validation.
I spent the better part of this afternoon trying to find a syntax that
is accepted by both Qpid and the Azure Event Hub.

Other people facing the same problem are resorting to modifying the Qpid
source code [3].


I think it would be enormously helpful if Qpid JMS would support setting
a custom JMS_SELECTOR_SYMBOL and provide an option to disable the
selector validation.

If such a change would have the chance of getting accepted I would
volunteer to implement this.

Is this in the realm of possibility?

~~ Michael

[1]
https://github.com/apache/qpid-jms/blob/0.55.0/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsSession.java#L476
[2]
https://github.com/apache/qpid-jms/blob/0.55.0/qpid-jms-client/src/main/javacc/SelectorParserImpl.jj
[3] https://stackoverflow.com/q/56194397/2377042

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to