Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels