You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Mridul Muralidharan (JIRA)" <ji...@apache.org> on 2012/06/21 23:13:44 UTC

[jira] [Created] (BOOKKEEPER-312) Implementation of JMS provider

Mridul Muralidharan created BOOKKEEPER-312:
----------------------------------------------

             Summary: Implementation of JMS provider
                 Key: BOOKKEEPER-312
                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
             Project: Bookkeeper
          Issue Type: Sub-task
            Reporter: Mridul Muralidharan



The JMS provider implementation conforming to the 1.1 spec.
The limitations as of now are :



1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.

2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.

Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.

3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.

4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
In hedwig, to unsubscribe, we need the subscription id and the topic ... 

To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.

The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.


5) Explicit session recovery is not supported.
Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.


6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.

Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.

7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.

This distinction is currently unsupported.

8) JMS spec requires
    "A connection's delivery of incoming messages can be temporarily stopped
using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."

  We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Mridul Muralidharan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mridul Muralidharan updated BOOKKEEPER-312:
-------------------------------------------

    Attachment: hedwig-client-jms.patch.5

Changed line length to roughly 100 chars or so.
Note that generated code and testcases from activemq are NOT modified.
                
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1, hedwig-client-jms.patch.2, hedwig-client-jms.patch.3, hedwig-client-jms.patch.4, hedwig-client-jms.patch.5
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Comment Edited] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13431729#comment-13431729 ] 

Sijie Guo edited comment on BOOKKEEPER-312 at 8/9/12 10:48 AM:
---------------------------------------------------------------

@Mridul,

{quote}
There are package info files on each package to give general idea of what it does.
It will be less overwhelming if you split effort along these lines as opposed to try to take everything in.
{quote}

thanks for providing these informations.

as previous jira's experiences, it would be better to split it by features, and splitting it would speed up reviewing. If it is difficult for you to do the split, I am OK to review, but it might take more time to finish it :-(
                
      was (Author: hustlmsp):
    @Mridul,

{quote}
There are package info files on each package to give general idea of what it does.
It will be less overwhelming if you split effort along these lines as opposed to try to take everything in.
{quote}

thanks for providing these informations.

as I mentioned, splitting the patches would speed up reviewing. If it is difficult for you to split, I am OK to review, but it might take more time to finish it :-(
                  
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1, hedwig-client-jms.patch.2, hedwig-client-jms.patch.3, hedwig-client-jms.patch.4, hedwig-client-jms.patch.5
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13414660#comment-13414660 ] 

Sijie Guo commented on BOOKKEEPER-312:
--------------------------------------

could you put the patch in on review board, since it is a big patch.

review board: https://reviews.apache.org/
                
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1, hedwig-client-jms.patch.2, hedwig-client-jms.patch.3
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13425865#comment-13425865 ] 

Sijie Guo commented on BOOKKEEPER-312:
--------------------------------------

@Mridul, could you put the patch in review board, since it is a big patch? it is quite difficult to make comments over a big patch. thanks in advance. 
                
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1, hedwig-client-jms.patch.2, hedwig-client-jms.patch.3, hedwig-client-jms.patch.4, hedwig-client-jms.patch.5
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Mridul Muralidharan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13428631#comment-13428631 ] 

Mridul Muralidharan commented on BOOKKEEPER-312:
------------------------------------------------

@Flavio.

There are package-info.html files on all packages IIRC - which gives a fairly brief and high level info on what the package does.
Admittedly, without referring to JMS spec, a lot of it might not make much sense unfortunately - ofcourse, adding more can help : not sure how much more !


Regarding "JMS Violation" comments.
There are two classes of those :
a) Where we are forced to deviate from or violate JMS spec due to Hedwig's design choices.
b) Where it is not clear (atleast to me) how things should behave.


Client api idioms, lack of server side filter support, ack'ing individual messages, etc fall under (a).
I have tried to clarify (b) mostly via expected behavior from other test suites and online search - but wanted to call them out in case of future issues.


@Sijie Guo

I will try to respond to the review request directly - hope that works better than trying here.
General comment regarding splitting the patch up - think along package lines - the code is conceptually split along that already.

Considering org.apache.hedwig.jms as base :
jndi interaction classes under 'jndi', 
actual hedwig comm will be under 'spi', 
selector code is under 'selector' (based off grammer under src/main/grammar), 
message objects under 'message', 
message metadata under 'message.header' (based off protobuf from src/main/protobuf), 
and the general jms base code under .
There is minimal interaction (except in unfortunate case of . and spi which I could not decouple better due to how code evolved)

There are package info files on each package to give general idea of what it does.
It will be less overwhelming if you split effort along these lines as opposed to try to take everything in.
                
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1, hedwig-client-jms.patch.2, hedwig-client-jms.patch.3, hedwig-client-jms.patch.4, hedwig-client-jms.patch.5
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13431729#comment-13431729 ] 

Sijie Guo commented on BOOKKEEPER-312:
--------------------------------------

@Mridul,

{quote}
There are package info files on each package to give general idea of what it does.
It will be less overwhelming if you split effort along these lines as opposed to try to take everything in.
{quote}

thanks for providing these informations.

as I mentioned, splitting the patches would speed up reviewing. If it is difficult for you to split, I am OK to review, but it might take more time to finish it :-(
                
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1, hedwig-client-jms.patch.2, hedwig-client-jms.patch.3, hedwig-client-jms.patch.4, hedwig-client-jms.patch.5
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Mridul Muralidharan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13428669#comment-13428669 ] 

Mridul Muralidharan commented on BOOKKEEPER-312:
------------------------------------------------

The review board was giving me some issues - I hope all my final comments made it through and not intermediate WIP comments ! A cursory glance did not bring anything up thought.

If anything does not make sense, is truncated or is just plain nonsensical, please do let me know - might be more to do with what I wrote and not review board barfing on me but I want to cover all bases :-)
                
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1, hedwig-client-jms.patch.2, hedwig-client-jms.patch.3, hedwig-client-jms.patch.4, hedwig-client-jms.patch.5
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13431745#comment-13431745 ] 

Sijie Guo commented on BOOKKEEPER-312:
--------------------------------------

update other comments in review board: https://reviews.apache.org/r/6277/
                
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1, hedwig-client-jms.patch.2, hedwig-client-jms.patch.3, hedwig-client-jms.patch.4, hedwig-client-jms.patch.5
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Mridul Muralidharan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mridul Muralidharan updated BOOKKEEPER-312:
-------------------------------------------

    Attachment: hedwig-client-jms.patch

The JMS provider implementation - with the limitations detailed in the description
                
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-jms.patch
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13427965#comment-13427965 ] 

Sijie Guo commented on BOOKKEEPER-312:
--------------------------------------

the overall patch looks great although I just taked a look at the skeleton of the patch w/o test cases and selector parts.

I had some general comments:

1) code style. it would be better to follow Java code convention for if-else, while, for blocks. http://www.oracle.com/technetwork/java/codeconventions-142311.html#449
2) In general, it would be better to provide detail meaningful messages for exception and log, not just short statement.
3) configurations. it would be better to have a configuration object for it, even for now we passing settings thru system properties. you could reference bookkeeper-server/AbstractConfiguration, we used a CompositeConfiguration to add a SystemConfiguration. so it could read settings from system properties
4) log4j provide mechanism to log the stack like #logger.debug("error message", exception). you don't need to do it separately using Util.dumpStacks you provided.

>> comments about Selector.

I think it would be better to define a interface like filter(Message message) to hide AST related structure under this interface. so we could decouple AST node (like Node ast ) from main logic. And it would be easy to split the big patch into several small parts. 

>> comments about patch review:

it is a too big patch for reviewing and covering them. My suggestion is to split it into several smaller patches.

these smaller patches could be:

1) skeleton of the code. publisher part code and test cases.
2) subscriber (consumer) part code w/o filtering and test cases. (it could be done if we had clean interface for filtering to hide selector part as my above comment)
3) selector part and filtering and test cases.
4) for queues, since hedwig doesn't support queue. it would be better to no include any code about queue, just throw UnsupportOperationException for future extension.

For this four parts, it would be better to have them in separated jiras. the later one's patch is generated based on the previous one.

I know it introduces additional works for you, but it did help the community to review your codes, give comments and improve code quality before any commits. And I could help you doing the split work if the suggestion makes sense for you. 

other comments about code you could check them in review board: https://reviews.apache.org/r/6277/
                
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1, hedwig-client-jms.patch.2, hedwig-client-jms.patch.3, hedwig-client-jms.patch.4, hedwig-client-jms.patch.5
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Mridul Muralidharan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mridul Muralidharan updated BOOKKEEPER-312:
-------------------------------------------

    Attachment: hedwig-client-jms.patch.2

Changes to implementation in line with the metadata changes and publish response changes.

All tests passed:

Tests run: 412, Failures: 0, Errors: 0, Skipped: 13

                
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1, hedwig-client-jms.patch.2
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Mridul Muralidharan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mridul Muralidharan updated BOOKKEEPER-312:
-------------------------------------------

    Attachment: hedwig-client-jms.patch.4

Add changes to root pom.xml into diff.
                
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1, hedwig-client-jms.patch.2, hedwig-client-jms.patch.3, hedwig-client-jms.patch.4
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Mridul Muralidharan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13427161#comment-13427161 ] 

Mridul Muralidharan commented on BOOKKEEPER-312:
------------------------------------------------

I assumed review board will send this out, but did not see any updates.
The review request is : https://reviews.apache.org/r/6277/
Please let me know if there are any issues accessing it.
                
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1, hedwig-client-jms.patch.2, hedwig-client-jms.patch.3, hedwig-client-jms.patch.4, hedwig-client-jms.patch.5
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Mridul Muralidharan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13426018#comment-13426018 ] 

Mridul Muralidharan commented on BOOKKEEPER-312:
------------------------------------------------

As I mentioned earlier at BOOKKEEPER-308, the review board gives me (when I tried again now)
"
Something broke! (Error 500)

It appears something broke when you tried to go to here. This is either a bug in Review Board or a server configuration error. Please report this to your administrator. 
"

I am using

Repository: Bookkeeper.
Base Directory: /
Diff: (path on my hdd to diff - as attached above)
                
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1, hedwig-client-jms.patch.2, hedwig-client-jms.patch.3, hedwig-client-jms.patch.4, hedwig-client-jms.patch.5
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Mridul Muralidharan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mridul Muralidharan updated BOOKKEEPER-312:
-------------------------------------------

    Attachment: hedwig-client-jms.patch.1

Cleanup some of the implementation and make it more extensible.
                
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Mridul Muralidharan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mridul Muralidharan updated BOOKKEEPER-312:
-------------------------------------------

    Attachment: hedwig-client-jms.patch.3

Use custom header definition based on JIRA feedback.
This will, unfortunately, mean that headers used in JMS clients will not be interoperable with other hedwig clients.
                
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1, hedwig-client-jms.patch.2, hedwig-client-jms.patch.3
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Flavio Junqueira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13427906#comment-13427906 ] 

Flavio Junqueira commented on BOOKKEEPER-312:
---------------------------------------------

A couple of high level comments before I forget:

# It would be great to have documentation
# Do comments like this "// JMS VIOLATION: we will be unable to check for propertyExists after this" require a jira?
                
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1, hedwig-client-jms.patch.2, hedwig-client-jms.patch.3, hedwig-client-jms.patch.4, hedwig-client-jms.patch.5
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Ivan Kelly (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Kelly updated BOOKKEEPER-312:
----------------------------------

    Fix Version/s: 4.2.0
    
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>             Fix For: 4.2.0
>
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1, hedwig-client-jms.patch.2, hedwig-client-jms.patch.3, hedwig-client-jms.patch.4, hedwig-client-jms.patch.5
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Sijie Guo (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13426239#comment-13426239 ] 

Sijie Guo commented on BOOKKEEPER-312:
--------------------------------------

@Mridul, your patch is generated using git. so please choose bookkeeper-git as your repository. please try again.
                
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1, hedwig-client-jms.patch.2, hedwig-client-jms.patch.3, hedwig-client-jms.patch.4, hedwig-client-jms.patch.5
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (BOOKKEEPER-312) Implementation of JMS provider

Posted by "Matthieu Morel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BOOKKEEPER-312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471644#comment-13471644 ] 

Matthieu Morel commented on BOOKKEEPER-312:
-------------------------------------------

I just added a few comments on the review board. ( https://reviews.apache.org/r/6277/ )

My view is that the effort is quite comprehensive, and missing features clearly identified. The patch should take the latest comments into account and be updated to match the latest trunk version. Then hopefully integrated.

Considering the current limitations are clearly outlined, it will be a good basis to build upon. Then we'd create specific tickets for each of the missing features, so that they are more focused.
                
> Implementation of JMS provider
> ------------------------------
>
>                 Key: BOOKKEEPER-312
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-312
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>             Fix For: 4.2.0
>
>         Attachments: hedwig-client-jms.patch, hedwig-client-jms.patch.1, hedwig-client-jms.patch.2, hedwig-client-jms.patch.3, hedwig-client-jms.patch.4, hedwig-client-jms.patch.5
>
>
> The JMS provider implementation conforming to the 1.1 spec.
> The limitations as of now are :
> 1) No support for Queue's : Hedwig currently does not have a notion of JMS queue's for us to leverage.
> 2) No support for noLocal : Hedwig DOES NOT conform to JMS model of connection -(n)-> session -(n)-> publisher/subscriber. Each session has a hedwig connection.
> Currently I am simulating noLocal, but this IS fragile and works for the duration of connection - ONLY until the message id is still in a LRUCache. As mentioned before, this is a kludge, and not a good solution.
> 3) Note that everything is durable in hedwig - so we do not support NON_PERSISTENT delivery mode.
> 4) Calling unsubscribe on a durable subscription will fail if it was NOT created in the current session.
> In hedwig, to unsubscribe, we need the subscription id and the topic ... 
> To simulate unsubscribe(), we store the subscriberId to topicName mapping when a create* api is invoked. Hence, if create* was NOT called, then we have no way to infer which topic the subscription-id refers to from hedwig, and so cant unsubscribe.
> The workaround is - simply create a durable subsriber just as a workaround of this limitation - the topicName will be known to the user/client anyway.
> 5) Explicit session recovery is not supported.
> Reconnection of hedwig session (either explicitly or implicitly by underlying client implementation) will automatically trigger redelivery of un-acknowledged messages.
> 6) Because of the above, setting the JMSRedelivered flag is almost impossible in a consistent way.
> Currently, we simulate it for redelivery due to provider side events : rollback of txn, exception in message listener (primarily).
> At best we can simulate it with a kludge - at risk of potentially running out of resources ... this is being investigated : but unlikely to have a clean fix.
> 7) Hedwig only supports marking all messages until seq-id as received : while JMS indicates ability to acknowledge individual messages.
> This distinction is currently unsupported.
> 8) JMS spec requires
>     "A connection's delivery of incoming messages can be temporarily stopped
> using its stop() method. It can be restarted using its start() method. When the connection is stopped, delivery to all the connection’s MessageConsumers is inhibited: synchronous receives block, and messages are not delivered to MessageListeners."
>   We honor this for undelivered messages from server - but if stop is called while there are pending messages yet to be delivered to a listener (or buffered in subscriber for receive), then they will be delivered irrespective of stop().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira