From 6e11b5466c177648ebfe571aa72515be8753e467 Mon Sep 17 00:00:00 2001 From: Matthias Stallmann Date: Mon, 28 Oct 2024 12:31:41 +0100 Subject: [PATCH] update readme --- packages/rabbitmq/README.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/rabbitmq/README.md b/packages/rabbitmq/README.md index b92d46c8f..657d225ba 100644 --- a/packages/rabbitmq/README.md +++ b/packages/rabbitmq/README.md @@ -488,10 +488,10 @@ export class AppController { If you just want to publish a message onto a RabbitMQ exchange, use the `publish` method of the `AmqpConnection` which has the following signature: ```typescript -public publish( +public publish( exchange: string, routingKey: string, - message: T, + message: any, options?: amqplib.Options.Publish ) ``` @@ -500,14 +500,6 @@ For example: ```typescript amqpConnection.publish('some-exchange', 'routing-key', { msg: 'hello world' }); - -// optionally specify a type for generic type checking support -interface CustomModel { - foo: string; - bar: string; -} -amqpConnection.publish('some-exchange', 'routing-key', {}); -// this will now show an error that you are missing properties: foo, bar ``` ### Requesting Data from an RPC