nestjsx / nestjs-amqp

Amqp connections for nestjs :love_letter:
MIT License
190 stars 24 forks source link

Decorators #5

Open bashleigh opened 6 years ago

bashleigh commented 6 years ago

If possible create a series of decorators to achieve the following implementation

@AmqpConnection('default')
export default class MyAmqpProvider {

    @Consume('queue_name', { ack: false})
    async listen(message) {
        console.log('message', message.content.toString());
    }

    @Exchange('exchange_name', 'queue_name')
    async exchange() {
        return 'send me to the queue';
    }
}
anhvu3594 commented 5 years ago

@bashleigh Thank you for your hard work. These features will be very helpful. Could you update the progress of them, please?

bashleigh commented 5 years ago

Honestly I haven't really had the time to dedicate to this feature unfortunately :( I'd love to do it! However the applications I built the package for have been working the way I implemented them so I haven't found the need to implement this feature at work so they won't let me really :'( I've also struggled to decide how to implement the feature so that's another hurdle.

I'll have another look today as I've got a bit of free time and try and decide the best way of implementing this feature. If you've got any idea I'd like to hear them :)