Skip to content

Commit a7171e2

Browse files
committed
Fixed incorrect routing logic.
Signed-off-by: Pavel Kirilin <[email protected]>
1 parent 1793644 commit a7171e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

taskiq_aio_pika/taskiq/brokers/aio_pika_broker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ async def startup(self) -> None:
6464
else:
6565
exchange = await channel.get_exchange(self.exchange_name, ensure=False)
6666
queue = await channel.declare_queue(self.queue_name)
67-
await queue.bind(exchange=exchange, routing_key="*")
67+
await queue.bind(exchange=exchange, routing_key="#")
6868

6969
async def kick(self, message: BrokerMessage) -> None:
7070
rmq_msg = Message(
@@ -77,7 +77,7 @@ async def kick(self, message: BrokerMessage) -> None:
7777
)
7878
async with self.channel_pool.acquire() as channel:
7979
exchange = await channel.get_exchange(self.exchange_name, ensure=False)
80-
await exchange.publish(rmq_msg, routing_key=message.task_id)
80+
await exchange.publish(rmq_msg, routing_key=message.task_name)
8181

8282
async def listen(self) -> AsyncGenerator[BrokerMessage, None]:
8383
async with self.channel_pool.acquire() as channel:

0 commit comments

Comments
 (0)