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

Different MessageID implementations for message Production and Consumption #324

Merged
merged 1 commit into from
Jul 24, 2020

Commits on Jul 14, 2020

  1. Different MessageID implementations for message Production and Consum…

    …ption
    
    This change splits the `MessageID` implementation in two:
    1. `messageID` - A 24 byte structure that contains message identification
                     information only; to be used during message production
    2. `trackingMessageID` - A 72 byte structucture that shares the same
                             message identification information as `messageID`
                             and adds `ackTracker`, `acker`, and `receivedTime`
                             fields; to be used during message consumption
    
    Micro benchmarks show that passing arguments by value that are less-than
    four words of memory are optimized by the Go runtime.  Results from the
    pulsar/impl_message_bench_test.go module are below.
    
    ```
    name            time/op
    ProducerCall    1.46ns ± 5%
    ProducerCall-4  1.47ns ± 5%
    ConsumerCall    7.62ns ± 1%
    ConsumerCall-4  7.53ns ± 5%
    ```
    Daniel Ferstay committed Jul 14, 2020
    Configuration menu
    Copy the full SHA
    593d7c1 View commit details
    Browse the repository at this point in the history