MessageProcessor #111
Closed
argomes1988
started this conversation in
General
Replies: 2 comments 10 replies
-
|
Hi
It seems everything is fine, can you please let me know what's not working
here?
…On Thu, Sep 9, 2021, 7:50 PM André Rodrigues ***@***.***> wrote:
Hi sonus21, how you doing? Can you help me? I'm trying to use both
preExecutionMessageProcessor and postExecutionMessageProcessor in a simple
test project, but it seems that the postExecutionMessageProcessor it's not
working properly.
My configs:
@bean <https://github.com/bean>
fun simpleRqueueListenerContainerFactory():
SimpleRqueueListenerContainerFactory {
val factory = SimpleRqueueListenerContainerFactory()
factory.preExecutionMessageProcessor = preExecutionMessageProcessor()
factory.postExecutionMessageProcessor = postExecutionMessageProcessor()
return factory
}
@bean
fun preExecutionMessageProcessor() : MessageProcessor = PreProcessor()
@bean
fun postExecutionMessageProcessor() : MessageProcessor = PostProcessor()
PreProcessor:
class PreProcessor : MessageProcessor {
override fun process(job: Job?): Boolean {
return super.process(job)
}
}
PostProcessor:
class PostProcessor() : MessageProcessor {
override fun process(job: Job?): Boolean {
return super.process(job)
}
}
Is anything wrong with my configurations? Thanks in advance, great project
btw.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#111>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC2FCPTASOBIVL3R6P3UQITUBC7B7ANCNFSM5DXIFM4Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Yes post execution processor should get called post execution of listener
method
…On Fri, Sep 10, 2021, 4:38 AM André Rodrigues ***@***.***> wrote:
When I try to debug both processors, only the preExecutionProcessor is
called. My project has a simple service where messages are enqued with a 10
second delay:
fun sampleMessageEnqueue(request: Email) {
logger.info("${MessageService::class.simpleName} - sampleMessageEnqueue:
$request")
rqueueMessageEnqueuer.enqueueIn("sample-topic", "topicId", request, 10000L)
}
My listener:
@RqueueListener(value = ["sample-topic"])
fun sampleMessageListener(request: Email) {
logger.info("${MessageListener::class.simpleName} -
sampleMessageListener")
}
Should postExecutionProcessor be executed after the sampleMessageListener
method?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#111 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC2FCPUYYAMJXSLQJMNDPOLUBE45FANCNFSM5DXIFM4Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi sonus21, how you doing? Can you help me? I'm trying to use both preExecutionMessageProcessor and postExecutionMessageProcessor in a simple test project, but it seems that the postExecutionMessageProcessor it's not working properly.
My configs:
@bean
fun simpleRqueueListenerContainerFactory(): SimpleRqueueListenerContainerFactory {
val factory = SimpleRqueueListenerContainerFactory()
factory.preExecutionMessageProcessor = preExecutionMessageProcessor()
factory.postExecutionMessageProcessor = postExecutionMessageProcessor()
return factory
}
PreProcessor:
class PreProcessor : MessageProcessor {
}
PostProcessor:
class PostProcessor() : MessageProcessor {
}
Is anything wrong with my configurations? Thanks in advance, great project btw.
Beta Was this translation helpful? Give feedback.
All reactions