[MB4] JMS 2.0 Support

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[MB4] JMS 2.0 Support

Maryam Ziyad
Hi All,

We are currently working on providing JMS 2.0 support with MB4.

JMS 1.1 vs JMS 2.0

JMS 2.0 has focused significantly on providing "ease of use".  
However the Classic API (JMS 1.1) has not been deprecated and the Simplified API (JMS 2.0) provides all the features of the Classic API along with several additional features.

The new messaging features introduced include:
  • Shared Subscription on Topics
  • Delivery Delay
  • Asynchronous Send
  • Delivery Count
An article explaining the new features in detail is available at [1].

There are several significant but related differences between JMS 1.1 (Classic API) and JMS 2.0 (Simplified API). These include replacements as follows:

Classic API

Simplified API

Connection

JMSContext

Session

JMSContext

MessageProducer

JMSProducer

MessageConsumer

JMSConsumer

JMSException

JMSRuntimeException



Given the similarities between these changes, we are currently looking at the feasibility of providing the functionality atop the existing code base, adding additional features where required. 

As the starting point we have begun working on the JMSContext, JMSProducer and JMSConsumer.

JMSContext, JMSProducer and JMSConsumer

With JMS 2.0, the basic messaging process is as shown in the diagram below.


Given the similarities, JMSContext (AMQJMSContext), JMSProducer (BasicJMSProducer) and JMSConsumer (BasicJMSConsumer) could be based on AMQConnection, AMQSession, BasicMessageProducer and BasicMessageConsumer.


--
Maryam Ziyad Mohamed
Software Engineer | WSO2
http://wso2.com/signature

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [MB4] JMS 2.0 Support

Pamod Sylvester
Hi Maryamm,

Will there be any frame definitions we might need to change in the existing AMQP 0_91 to work with JMS 2.0 ? 

Thanks,
Pamod

On Tue, Jun 6, 2017 at 8:36 AM, Maryam Ziyad <[hidden email]> wrote:
Hi All,

We are currently working on providing JMS 2.0 support with MB4.

JMS 1.1 vs JMS 2.0

JMS 2.0 has focused significantly on providing "ease of use".  
However the Classic API (JMS 1.1) has not been deprecated and the Simplified API (JMS 2.0) provides all the features of the Classic API along with several additional features.

The new messaging features introduced include:
  • Shared Subscription on Topics
  • Delivery Delay
  • Asynchronous Send
  • Delivery Count
An article explaining the new features in detail is available at [1].

There are several significant but related differences between JMS 1.1 (Classic API) and JMS 2.0 (Simplified API). These include replacements as follows:

Classic API

Simplified API

Connection

JMSContext

Session

JMSContext

MessageProducer

JMSProducer

MessageConsumer

JMSConsumer

JMSException

JMSRuntimeException



Given the similarities between these changes, we are currently looking at the feasibility of providing the functionality atop the existing code base, adding additional features where required. 

As the starting point we have begun working on the JMSContext, JMSProducer and JMSConsumer.

JMSContext, JMSProducer and JMSConsumer

With JMS 2.0, the basic messaging process is as shown in the diagram below.


Given the similarities, JMSContext (AMQJMSContext), JMSProducer (BasicJMSProducer) and JMSConsumer (BasicJMSConsumer) could be based on AMQConnection, AMQSession, BasicMessageProducer and BasicMessageConsumer.


--
Maryam Ziyad Mohamed
Software Engineer | WSO2
http://wso2.com/signature

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




--
Pamod Sylvester 
WSO2 Inc.; http://wso2.com
cell: +94 77 7779495

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [MB4] JMS 2.0 Support

Maryam Ziyad
Hi Pamod,

Will there be any frame definitions we might need to change in the existing AMQP 0_91 to work with JMS 2.0 ?

We have not had to modify any frames so far, to provide basic support for JMS 2.0. However since we are still to implement the new functionality provided by JMS 2.0, we may have to modify the frame definitions to support them. 

I will update the thread with any modifications required.

Thank you,
Maryam
--
Maryam Ziyad Mohamed
Software Engineer | WSO2
http://wso2.com/signature

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [MB4] JMS 2.0 Support

Maryam Ziyad
Hi All,

We have implemented support for basic functionality with JMS 2.0 as proposed [1].

This includes partial support for JMSContext, JMSProducer and JMSConsumer with support for: 
  • Simple synchronous send/receive
  • Asynchronous receive
  • Durable subscription
We will now be working on providing the new functionality introduced with JMS 2.0 including shared subscriptions. 

Shared Subscription

While the JMS 1.1 API did not allow multiple consumers to share a single subscription on a topic, this capability was allowed by MB 3.x.x, via a configuration in broker.xml [2]. Now, with JMS 2.0, shared subscription is to be allowed on topics at API level.

The JMS 2.0 specification mentions that the restriction of not allowing shared topic subscriptions was removed because "it did not allow sharing of work among multiple connections, threads or JVMs" (JMS_SPEC-40). Thus even though not explicitly mentioned, could we assume that the consumers sharing the subscription are from different connections and thus from different sessions and JMSContexts? 

In the existing shared consumer implementation in MB 3.x.x, each consumer sharing the subscription needs to be created from a separate session. Assuming that there would not be cases where we would use the same JMSContext/Session to create shared subscribers, providing support for shared subscription with JMS 2.0 could be directly based on the existing implementation. 

Feedback on the above would be highly appreciated.


Thank you,
Maryam

On Mon, Jun 19, 2017 at 1:33 PM, Maryam Ziyad <[hidden email]> wrote:
Hi Pamod,

Will there be any frame definitions we might need to change in the existing AMQP 0_91 to work with JMS 2.0 ?

We have not had to modify any frames so far, to provide basic support for JMS 2.0. However since we are still to implement the new functionality provided by JMS 2.0, we may have to modify the frame definitions to support them. 

I will update the thread with any modifications required.

Thank you,
Maryam
--
Maryam Ziyad Mohamed
Software Engineer | WSO2
http://wso2.com/signature



--
Maryam Ziyad Mohamed
Software Engineer | WSO2
http://wso2.com/signature

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [MB4] JMS 2.0 Support

Pamod Sylvester
Shall we also check how the other brokers handle this ? 

The JMS 2.0 specification mentions that the restriction of not allowing shared topic subscriptions was removed because "it did not allow sharing of work among multiple connections, threads or JVMs" (JMS_SPEC-40). Thus even though not explicitly mentioned, could we assume that the consumers sharing the subscription are from different connections and thus from different sessions and JMSContexts? 

On Mon, Jun 19, 2017 at 5:09 PM, Maryam Ziyad <[hidden email]> wrote:
Hi All,

We have implemented support for basic functionality with JMS 2.0 as proposed [1].

This includes partial support for JMSContext, JMSProducer and JMSConsumer with support for: 
  • Simple synchronous send/receive
  • Asynchronous receive
  • Durable subscription
We will now be working on providing the new functionality introduced with JMS 2.0 including shared subscriptions. 

Shared Subscription

While the JMS 1.1 API did not allow multiple consumers to share a single subscription on a topic, this capability was allowed by MB 3.x.x, via a configuration in broker.xml [2]. Now, with JMS 2.0, shared subscription is to be allowed on topics at API level.

The JMS 2.0 specification mentions that the restriction of not allowing shared topic subscriptions was removed because "it did not allow sharing of work among multiple connections, threads or JVMs" (JMS_SPEC-40). Thus even though not explicitly mentioned, could we assume that the consumers sharing the subscription are from different connections and thus from different sessions and JMSContexts? 

In the existing shared consumer implementation in MB 3.x.x, each consumer sharing the subscription needs to be created from a separate session. Assuming that there would not be cases where we would use the same JMSContext/Session to create shared subscribers, providing support for shared subscription with JMS 2.0 could be directly based on the existing implementation. 

Feedback on the above would be highly appreciated.


Thank you,
Maryam

On Mon, Jun 19, 2017 at 1:33 PM, Maryam Ziyad <[hidden email]> wrote:
Hi Pamod,

Will there be any frame definitions we might need to change in the existing AMQP 0_91 to work with JMS 2.0 ?

We have not had to modify any frames so far, to provide basic support for JMS 2.0. However since we are still to implement the new functionality provided by JMS 2.0, we may have to modify the frame definitions to support them. 

I will update the thread with any modifications required.

Thank you,
Maryam
--
Maryam Ziyad Mohamed
Software Engineer | WSO2
http://wso2.com/signature



--
Maryam Ziyad Mohamed
Software Engineer | WSO2
http://wso2.com/signature

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




--
Pamod Sylvester 
WSO2 Inc.; http://wso2.com
cell: +94 77 7779495

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [MB4] JMS 2.0 Support

Asitha Nanayakkara
In reply to this post by Maryam Ziyad
Hi Maryam,

On Mon, Jun 19, 2017 at 5:09 PM, Maryam Ziyad <[hidden email]> wrote:
Hi All,

We have implemented support for basic functionality with JMS 2.0 as proposed [1].

This includes partial support for JMSContext, JMSProducer and JMSConsumer with support for: 
  • Simple synchronous send/receive
  • Asynchronous receive
  • Durable subscription
We will now be working on providing the new functionality introduced with JMS 2.0 including shared subscriptions. 

Shared Subscription

While the JMS 1.1 API did not allow multiple consumers to share a single subscription on a topic, this capability was allowed by MB 3.x.x, via a configuration in broker.xml [2]. Now, with JMS 2.0, shared subscription is to be allowed on topics at API level.

For this we might need to introduce a new AMQP frame. As Pamod suggested we might need to have a look at how other brokers have done this.

The JMS 2.0 specification mentions that the restriction of not allowing shared topic subscriptions was removed because "it did not allow sharing of work among multiple connections, threads or JVMs" (JMS_SPEC-40). Thus even though not explicitly mentioned, could we assume that the consumers sharing the subscription are from different connections and thus from different sessions and JMSContexts? 

Yes.

In the existing shared consumer implementation in MB 3.x.x, each consumer sharing the subscription needs to be created from a separate session. Assuming that there would not be cases where we would use the same JMSContext/Session to create shared subscribers, providing support for shared subscription with JMS 2.0 could be directly based on the existing implementation. 

AFAIR this is a limitation of MB implementation. There is no restriction from JMS spec for this. Can you go through the code and check the feasibility for supporting multiple subscribers from the same session? If it is not a drastic change we can have a go at it.

Regards,
Asitha

Feedback on the above would be highly appreciated.


Thank you,
Maryam

On Mon, Jun 19, 2017 at 1:33 PM, Maryam Ziyad <[hidden email]> wrote:
Hi Pamod,

Will there be any frame definitions we might need to change in the existing AMQP 0_91 to work with JMS 2.0 ?

We have not had to modify any frames so far, to provide basic support for JMS 2.0. However since we are still to implement the new functionality provided by JMS 2.0, we may have to modify the frame definitions to support them. 

I will update the thread with any modifications required.

Thank you,
Maryam
--
Maryam Ziyad Mohamed
Software Engineer | WSO2
http://wso2.com/signature



--
Maryam Ziyad Mohamed
Software Engineer | WSO2
http://wso2.com/signature

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




--
Senior Software Engineer
Mob: +94 77 853 0682
https://wso2.com/signature


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
Reply | Threaded
Open this post in threaded view
|

Re: [MB4] JMS 2.0 Support

Maryam Ziyad
Hi All,

Thank you for the suggestions.

With regard to other brokers supporting JMS 2.0, ActiveMQ Artemis allows the creation of multiple shared consumers on a single JMSContext and messages are received as expected. However even the shared consumer example made available in Artemis [1] uses two JMSContexts to create two separate consumers sharing a single subscription.

Furthermore the Oracle blog [2], by the JMS 2.0 specification lead, describing the new features in JMS 2.0 also talks about shared subscription in the context of two JVMs or two threads on a single JVM.

As suggested, I will check the feasibility of allowing shared subscription for multiple consumers, from a single session, with the current implementation. If this is possible, allowing shared subscriptions for consumers from a single JMSContext would also be straightforward since a single JMSContext is basically the combination of a single connection and a single session.


Thanks,
Maryam

On Tue, Jun 20, 2017 at 9:12 AM, Asitha Nanayakkara <[hidden email]> wrote:
Hi Maryam,

On Mon, Jun 19, 2017 at 5:09 PM, Maryam Ziyad <[hidden email]> wrote:
Hi All,

We have implemented support for basic functionality with JMS 2.0 as proposed [1].

This includes partial support for JMSContext, JMSProducer and JMSConsumer with support for: 
  • Simple synchronous send/receive
  • Asynchronous receive
  • Durable subscription
We will now be working on providing the new functionality introduced with JMS 2.0 including shared subscriptions. 

Shared Subscription

While the JMS 1.1 API did not allow multiple consumers to share a single subscription on a topic, this capability was allowed by MB 3.x.x, via a configuration in broker.xml [2]. Now, with JMS 2.0, shared subscription is to be allowed on topics at API level.

For this we might need to introduce a new AMQP frame. As Pamod suggested we might need to have a look at how other brokers have done this.

The JMS 2.0 specification mentions that the restriction of not allowing shared topic subscriptions was removed because "it did not allow sharing of work among multiple connections, threads or JVMs" (JMS_SPEC-40). Thus even though not explicitly mentioned, could we assume that the consumers sharing the subscription are from different connections and thus from different sessions and JMSContexts? 

Yes.

In the existing shared consumer implementation in MB 3.x.x, each consumer sharing the subscription needs to be created from a separate session. Assuming that there would not be cases where we would use the same JMSContext/Session to create shared subscribers, providing support for shared subscription with JMS 2.0 could be directly based on the existing implementation. 

AFAIR this is a limitation of MB implementation. There is no restriction from JMS spec for this. Can you go through the code and check the feasibility for supporting multiple subscribers from the same session? If it is not a drastic change we can have a go at it.

Regards,
Asitha

Feedback on the above would be highly appreciated.


Thank you,
Maryam

On Mon, Jun 19, 2017 at 1:33 PM, Maryam Ziyad <[hidden email]> wrote:
Hi Pamod,

Will there be any frame definitions we might need to change in the existing AMQP 0_91 to work with JMS 2.0 ?

We have not had to modify any frames so far, to provide basic support for JMS 2.0. However since we are still to implement the new functionality provided by JMS 2.0, we may have to modify the frame definitions to support them. 

I will update the thread with any modifications required.

Thank you,
Maryam
--
Maryam Ziyad Mohamed
Software Engineer | WSO2
http://wso2.com/signature



--
Maryam Ziyad Mohamed
Software Engineer | WSO2
http://wso2.com/signature

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




--
Senior Software Engineer
Mob: <a href="tel:+94%2077%20853%200682" value="+94778530682" target="_blank">+94 77 853 0682
https://wso2.com/signature


_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture




--
Maryam Ziyad Mohamed
Software Engineer | WSO2
http://wso2.com/signature

_______________________________________________
Architecture mailing list
[hidden email]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture