fp-in-bo / jms4s

A functional wrapper for jms
https://fp-in-bo.github.io/jms4s
MIT License
16 stars 9 forks source link

Support for JMS 1.1? #30

Open AL333Z opened 4 years ago

AL333Z commented 4 years ago

Currently, we're only targetting JMS 2 since the API is exposing features that are only available starting from JMS 2 (e.g. publish with delay). Also, internals now depends on JMSContext, which is available from JMS 2.

The only reason to support JMS 1.1 is to give support to additional providers which are currently only targeting JMS 1.1:

Now, if I need to use a lib for interacting with RabbitMQ I'd just use a lib just like fs2-rabbit, so I'm not sure what to do here.

Considerations:

adamretter commented 1 year ago

@AL333Z I started looking at adding a Provider for Amazon SQS. Unfortunately SQS only supports JMS 1.1, whilst jms4s requires JMS 2.0.

From reading the issues and PRs against amazon-sqs-java-messaging-lib it does not look like Amazon plans to provide JMS 2 support anytime soon :-(

I also concluded that "JMS 2 looks to be retro compatible with JMS 1.1".

I read here that JMSContext seems to be a convenience:

In terms of the JMS 1.1 API a JMSContext should be thought of as representing both a Connection and a Session. Although the simplified API removes the need for applications to use those objects, the concepts of connection and session remain important. A connection represents a physical link to the JMS server and a session represents a single-threaded context for sending and receiving messages.

I wonder if it would be possible to somehow abstract JMSContext below JMS 1.1 and JMS 2.0 specific implementations, so that jms4s could work with either API depending on what is provided on the classpath. For things like publish with delay perhaps this could simply throw an UnsupportedOperationException if using JMS 1.1.

Is there any interest from yourself or any of the other project maintainers to see something like this happen? Unfortunately I need something urgently to work with SQS. I am happy to provide PRs etc, but I would like to know if there is any interest in reviewing and merging such changes?

AL333Z commented 1 year ago

Hi @adamretter, I'd recommend trying fs2-aws.

Summoning @faustin0 (the remaining maintainer that's still around, I guess).

adamretter commented 1 year ago

@AL333Z Thanks that is interesting but ideally we wanted to stick with JMS so that we can change provider if necessary, at present we are uncertain if SQS will work out for us. Likewise, using a different provider than AmazonSQS is useful for our integration tests.

the remaining maintainer that's still around, I guess

Does this mean that this project should now be considered unmaintained/abandoned?

adamretter commented 1 year ago

I have started prototyping a JMS 1.1 approach here - https://github.com/evolvedbinary/jms4s/tree/aws-sqs