in app, need customized call of save method on post restful service post event rabbitmq queue.
each time consumer of api firing post on resource, want publish event on rabbitmq queue make asynchronous processing.
right now, use @repositoryrestresource , spring-data-jpa expose crud api on spring-data jpa repository. job, straightforward , simple. i'd stick in case of post (save method) i'd compose or change behaviour. need store data in database publish event in rabbitmq queue.
i tried several solution failed.
may have solution . how extend particular method in rest crud repository ?
one way have solved kind of problem in past use aspect oriented programming, , luckily since using spring framework quite easy , documented. put "around" advice around constructor domain objects (just suggestion) , have send message rabbitmq exchange.
another way of doing use the log4j amqp appender , log object prior saving it.
Comments
Post a Comment