-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spike/CAS-1341-CAS2-Prison-Transfer-Event-Emit-POC #2834
base: main
Are you sure you want to change the base?
spike/CAS-1341-CAS2-Prison-Transfer-Event-Emit-POC #2834
Conversation
@@ -64,6 +64,10 @@ generic-service: | |||
elasticache-redis: | |||
SPRING_DATA_REDIS_HOST: "primary_endpoint_address" | |||
SPRING_DATA_REDIS_PASSWORD: "auth_token" | |||
inbound-queue-sqs-instance-output: | |||
HMPPS_SQS_QUEUES_INBOUNDQUEUE_QUEUE_NAME: "inboundqueue" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a specific reason this isn't either camel or snake case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent!
bc64d4d
to
f2a191a
Compare
...kotlin/uk/gov/justice/digital/hmpps/approvedpremisesapi/integration/cas2/InboundQueueTest.kt
Show resolved
Hide resolved
fun `Put Message on Inbound Queue Request is successful`() { | ||
putMessageOnInboundQueue() | ||
TimeUnit.MILLISECONDS.sleep(10000) | ||
verify(exactly = 1) { mockMessageListener.processMessage(any()) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again, probably not an issue as this is POC but a library like awaitility would let us remove this sleep. I'm not sure if there's a more kotlin way of doing it though!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we even need the sleep tbf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh yes we do! fails when i remove!
This is a POC branch to demonstrate how to set up a listener for the domain events topic. Message Listener listens to the inboundQueue which is filtered by the allocation and handover event types and prints out the message. You can run it locally and send messages using the scripts found in test-messages in the test resources folder. It has a simple Integration test that checks that the listener was called and also a tests to check the health of the queue.
f2a191a
to
f422f8d
Compare
This is a POC branch to demonstrate how to set up a listener for the domain events topic.
Message Listener listens to the inboundQueue which is filtered by the allocation and handover event types and prints out the message.
You can run it locally and send messages using the scripts found in test-messages in the test resources folder.
It has a simple Integration test that checks that the listener was called and also a tests to check the health of the queue.