Skip to content

Commit

Permalink
Make use of async MQ consumers configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Jan 20, 2025
1 parent 3e81c71 commit eff769b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions docker_overlay/opt/neon/neon.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
MQ:
async_consumers: True
server: neon-rabbitmq
port: 5672
users:
Expand Down
2 changes: 2 additions & 0 deletions neon_iris/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ def _send_serialized_message(self, serialized: dict):

def _init_mq_connection(self):
mq_config = self._config.get("MQ") or self._config
NeonMQHandler.async_consumers_enabled = mq_config.get("async_consumers",
True)
mq_connection = NeonMQHandler(mq_config, "mq_handler", self._vhost)
mq_connection.register_consumer("neon_response_handler", self._vhost,
self.uid, self.handle_neon_response,
Expand Down

0 comments on commit eff769b

Please sign in to comment.