diff --git a/package.json b/package.json index 9fa7e78..086d75a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "arnavmq", - "version": "0.16.3", + "version": "0.16.4", "description": "ArnavMQ is a RabbitMQ wrapper", "keywords": [ "rabbitmq", diff --git a/types/modules/producer.d.ts b/types/modules/producer.d.ts index 6fc9c30..ea0e1eb 100644 --- a/types/modules/producer.d.ts +++ b/types/modules/producer.d.ts @@ -8,8 +8,15 @@ declare class ProducerError extends Error { } interface ProduceOptions extends amqp.Options.Publish { + /** + * When provided, will publish instead of sending to queue, with the given `queue` parameter serving as the exchange and this as the routing key. + * When sending to the default exchange, it is the same as not passing the option: `producer.produce('', "message", {routingKey:"my-queue"})` is the same as `producer.produce('my-queue', "message")` + */ routingKey?: string; + /** When true, will produce the request with RPC settings, waiting for a response on a dedicated response queue after sending the message, and finally returning it. */ rpc?: boolean; + /** Timeout in milliseconds for producing RPC request and waiting for the response. Does not affect non-rpc requests. */ + timeout?: number; } declare class Producer {