Skip to content

Commit

Permalink
Remove incorrect consumer timeout
Browse files Browse the repository at this point in the history
Fixes #4308
  • Loading branch information
ogenstad committed Sep 19, 2024
1 parent 27c44ea commit 0c3b7e8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/infrahub/services/adapters/message_bus/rabbitmq.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ async def _initialize_api_server(self) -> None:
queue = await self.channel.declare_queue(
f"{self.settings.namespace}.rpcs",
durable=True,
arguments={"x-max-priority": 5, "x-consumer-timeout": self.DELIVER_TIMEOUT * 1000},
arguments={"x-max-priority": 5},
)

self.delayed_exchange = await self.channel.declare_exchange(
Expand Down
11 changes: 11 additions & 0 deletions changelog/4308.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Fixed incorrect consumer timeout for RabbitMQ queue infrahub.rpcs

If you are upgrading from a previous version of Infrahub and using the provided Docker Compose files you don't have to take any additional action. However if you are using your own setup for RabbitMQ you will need to manually delete the queue yourself.

Swap the container name and credentials to RabbitMQ if they are different in your setup:

```bash
docker exec -it infrahub-message-queue-1 rabbitmqadmin --username infrahub --password infrahub delete queue name=infrahub.rpcs
```

After this step Infrahub and the Git agents need to be restarted, when doing so the correct queue will be recreated.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ x-infrahub-config: &infrahub_config

services:
message-queue:
image: ${MESSAGE_QUEUE_DOCKER_IMAGE:-rabbitmq:3.13.1-management}
image: ${MESSAGE_QUEUE_DOCKER_IMAGE:-rabbitmq:3.13.7-management}
restart: unless-stopped
environment:
RABBITMQ_DEFAULT_USER: *broker_username
Expand Down
2 changes: 1 addition & 1 deletion tasks/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class DatabaseType(str, Enum):
)
NEO4J_DOCKER_IMAGE = os.getenv("NEO4J_DOCKER_IMAGE", "neo4j:5.19.0-enterprise")
MESSAGE_QUEUE_DOCKER_IMAGE = os.getenv(
"MESSAGE_QUEUE_DOCKER_IMAGE", "rabbitmq:3.13.1-management" if not INFRAHUB_USE_NATS else "nats:2.10.14-alpine"
"MESSAGE_QUEUE_DOCKER_IMAGE", "rabbitmq:3.13.7-management" if not INFRAHUB_USE_NATS else "nats:2.10.14-alpine"
)
CACHE_DOCKER_IMAGE = os.getenv("CACHE_DOCKER_IMAGE", "redis:7.2.4" if not INFRAHUB_USE_NATS else "nats:2.10.14-alpine")

Expand Down

0 comments on commit 0c3b7e8

Please sign in to comment.