Skip to content

Commit

Permalink
update readme (#865)
Browse files Browse the repository at this point in the history
Co-authored-by: Rodrigo <[email protected]>
  • Loading branch information
feelgood-interface and underfisk authored Oct 28, 2024
1 parent 9d33bd5 commit 6b2bb06
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions packages/rabbitmq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<T = any>(
public publish(
exchange: string,
routingKey: string,
message: T,
message: any,
options?: amqplib.Options.Publish
)
```
Expand All @@ -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<CustomModel>('some-exchange', 'routing-key', {});
// this will now show an error that you are missing properties: foo, bar
```

### Requesting Data from an RPC
Expand Down

0 comments on commit 6b2bb06

Please sign in to comment.