Skip to content

MessageReceipt should have getMessageId and getOffset api #55

Open
@odbozhou

Description

@odbozhou

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions