MetPX / MetPX/sarrac

support explicit acks

Open
#121 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug different_from_python
Dominant language
C
Stars
4
Forks
1
Avg merge
5d 1h
Merged PRs (30d)
1

Description

in working on #120, I noticed that the C consumer auto_acknowledges messages in the library, in contrast to the careful control of acks in the python3.


             amqp_basic_consume(sr_c->cfg->broker->conn, 1,
                                   amqp_cstring_bytes(sr_c->cfg->queuename),
                                   //amqp_empty_bytes, // consumer_tag
                                   amqp_cstring_bytes(consumer_tag), 0, // no_local
                                   1,   // no_ack ( == auto-ack ) - if set to 1, then comment out basic_ack code above.
                                   0,   // not_exclusive
                                   amqp_empty_table);


The no_ack refers to not requiring the client to acknowledge messages. Long ago, I think there was testing of using acknowledgement, and the code is still there in comments... so I guess it never worked. Should revisit at some point.

  • note that the consumer (aka cpump) isn't used anywhere for anything at the moment, so priority of fixing it is low.

  • So this means that when messageRateMax is set to force queueing on the broker, the library will greedily read all the messages, and the broker side queue will disappear regardless of whether the application has seen it yet.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the C consumer (cpump) and its amqp_basic_consume call, then compare its no_ack setting with the Python 3 consumer and the commented acknowledgement code. Done means the C consumer supports explicit acknowledgements so broker-side messages are not consumed before the application has seen them; the issue notes that this consumer is currently unused.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.