[ 
https://issues.apache.org/jira/browse/KAFKA-398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Guozhang Wang updated KAFKA-398:
--------------------------------

    Attachment: kafka-398-0.7-v1.patch

This patch is based on 0.7, which is from my current implementation. Currently 
I work around this issue by:

1. Keeping a [consumerId, socket-server-processor-id, key] on the coordinator, 
which will be updated for handling the consumer registering request.

2. Add one more handlers class for coordinator requests, which require key and 
processor id in addition to the byte buffer

3. One thing that is still missing is an additional function for processors, 
which take the message and the key as the input, and try to send it by first 
clear the key's attachment, put the message as its new attachment, and then 
mark the key opt as WRITABLE.
                
> Enhance SocketServer to Enable Sending Requests
> -----------------------------------------------
>
>                 Key: KAFKA-398
>                 URL: https://issues.apache.org/jira/browse/KAFKA-398
>             Project: Kafka
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 0.7, 0.8
>            Reporter: Guozhang Wang
>              Labels: features
>         Attachments: kafka-398-0.7-v1.patch
>
>
> Currently the SocketServer is only used for reactively receiving requests and 
> send responses but not used for pro-actively send requests and receive 
> responses. Hence it does not need to remember which channel/key correspond to 
> which consumer.
> On the other hand, there are cases such as consumer coordinator that needs 
> SocketServer to send requests and receive responses to the consumers.
> It would be nice to add this functionality such that an API can be called 
> with the id string and the request message, and the SocketServer will figure 
> out which channel to use and write that message to the key's attachment and 
> set the flag as WRITABLE so that the processor can then send it.

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