vert-x3 / vertx-amqp-client

An AMQP client for Vert.x
Apache License 2.0
17 stars 18 forks source link

Add option to specify JMS message selector/filter #66

Closed sebthom closed 2 years ago

sebthom commented 2 years ago

Describe the feature

It should be possible to specify a message selector via the AmqpReceiverOptions, either

  1. directly via a setter method like setFilter/setMessageFilter etc. or
  2. by exposing the underlying org.apache.qpid.proton.amqp.messaging.Source so additionally configurations can be applied as needed, e.g. by providing a Source callback handler:
    1. either on the AmqpReceiverOptions e.g. AmqpReceiverOptions.setSourceConfigurer(Consumer<Source>), or
    2. as additional method parameter for AmqpConnection#createReceiver e.g AmqpConnection.createReceiver(String, AmqpReceiverOptions, Consumer<Source>)

Use cases

We want to use vertx-amqp-client with an existing ActiveMQ Artemis broker that supports JMS style message selectors.

Contribution

I am willing to implement this but I need some guidance regarding the preferred approach. @vietj @gemmellr

Looking at https://github.com/apache/qpid-jms/blob/8113b93fae8bb7f90f31fe0e68fcab46b330348f/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/builders/AmqpConsumerBuilder.java#L253-L259 the actual AMQP configuration seems trivial.

sebthom commented 2 years ago

@cescoffier @vietj Now that this feature is implemented, do you think you could cut a release? We really need this feature and would like to use official jar.