#2230 protonmsg persistent message queue
Closed: Fixed 3 years ago by tkopecek. Opened 3 years ago by tkopecek.

Currently message queue is implemented via context, so each thread has its own queue. As queue needn't to be consumed before the EOL of httpd thread, messages can be silently dropped. Maybe separate db table should be used for this (maybe temporary one, but that is questionable).


Metadata Update from @tkopecek:
- Custom field Size adjusted to None

3 years ago

As queue needn't to be consumed before the EOL of httpd thread

The context ThreadLocal object is cleared before and after each call. This was never a queue that persisted across calls. The context.protonmsg_msgs field was merely intended to buffer the messages during a single call so that they could be sent during the postCommit callback.

In the postCommit handler, the plugin will try to send all messages from context.protonmsg_msgs. The only reason that these messages would not be consumed are:

  • if the postCommit callback is not reached (in which case, it is probably correct to drop the messages)
  • if sending the message fails

Metadata Update from @tkopecek:
- Issue tagged with: testing-ready

3 years ago

Commit 5167fee relates to this ticket

Metadata Update from @jcupova:
- Issue tagged with: testing-done

3 years ago

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #2512 Merged 3 years ago
  • #2441 Merged 3 years ago