[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13409570#comment-13409570
 ] 

Sijie Guo commented on BOOKKEEPER-311:
--------------------------------------

I don't think it's inconsistent between apis. the usage of consume is to ack 
hub server when it received and processed a message. if you treated message 
delivery as a kind of request, consume could be treated as its response, which 
is a kind of server->client operation. from this side, it is different from 
pub/sub/unsub requests, which are client->server operations. also for 
pub/sub/unsub, we had to receive the response even using asynchronized api, 
which is the semantic require for these actions.  

{quote}
Having said that, as long as there is reasonable assurance that best case 
effort was made to send consume request to server, any additional guarantees 
would be better 
{quote}

I agreed. but for some proxy-style use cases, there are several running servers 
using hedwig client interacting with hub servers. so the connection would not 
be broken until it is down, so netty could handle sending consume request for 
it without blocking its other logic. why not leverage it?

yes. for auto-consume clients, it is OK to provide better guarantee as it 
could. but for those clients who consume themselves, they could choose how to 
ack hub server as original api provided.

 
                
> Changes in hedwig client api to support JMS spec
> ------------------------------------------------
>
>                 Key: BOOKKEEPER-311
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-311
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Mridul Muralidharan
>         Attachments: hedwig-client-consume.patch.1, 
> hedwig-client-publish.patch.1, hedwig-client.patch
>
>
> Primary changes are :
> a) Add support for returning seq-id for a publish request. This is an api 
> change (backwardly compatible for users).
> b) Make consume a sync consume, with addition of an asyncConsume - this is to 
> ensure that invoking consume() ensure request makes to server before 
> returning (with what reasonable gaurantees that netty allows).
> c) Ensure that explicit close'ing of session will flush buffered consume 
> seq-id's when auto-ack is enabled (default in hedwig java client).
> In addition, there are also fixes for
> d) Fix NPE's observed as part of testing JMS provider.

--
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

        

Reply via email to