Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MessageReceipt should have getMessageId and getOffset api #55

Open
odbozhou opened this issue Jun 3, 2019 · 0 comments
Open

MessageReceipt should have getMessageId and getOffset api #55

odbozhou opened this issue Jun 3, 2019 · 0 comments

Comments

@odbozhou
Copy link

odbozhou commented Jun 3, 2019

In the openmessaging-java api, MessageReceipt is mainly used in the following APIs

void ack(MessageReceipt receipt);
Message receive(String queueName, QueueMetaData queueMetaData, MessageReceipt messageReceipt, long timeout);
List<Message> batchReceive(String queueName, QueueMetaData queueMetaData, MessageReceipt messageReceipt,

But MessageReceipt is an empty interface,when used in ACK api, it should have get messageId API to confirmation message,when used in receive api, it should have getOffset API to pull message by offset,Otherwise, the API is not very useful and must be forced to convert to an implementation class, which obviously violates the Interface-oriented programming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant