2. Without Messaging System
● To many integrations point and different implementation like:
○ Data protokol: data link / Api / Files/Ftp
○ Data Format: JSON / CSV / XML
○ Need to maintain the connections
App 1 App 2 App 3 App 4
App 5 App 6 App 7 App 8
5. Queue & Exchange
1. Queue :
Is a line that store message
1. Exchanges :
Routing message to Queue
1. Routing Key :
A key that the exchange looks
to decide how to route the
message to queue
1. Binding :
A link between exchange to
queue
25. How to Implement TTL
Create the Queue with argument Message TTL and set it 10 seconds (10.000 ms)
26. Manual Acknowledge
Update Application.yml
Will go to DLX if
we define the
DLX, else the
queue just gone
Will rem0ve the
queue or the
queue is done
Spring by default will automatically Ack.
But when we have THROWS Exception,
the consumer will consume invalid message with
infinite loop.
27. Retry Mechanism (when consume the Queue)
View log on Gist
Consume Log Time Time Diff (s)
First 2020-08-09 19:02:47.928 0s
Second 2020-08-09 19:02:50.943 3s (3x1)
Third 2020-08-09 19:02:56.945 6s (3x2)
Fourth 2020-08-09 19:03:06.951 10s (max-interval)
Fifth 2020-08-09 19:03:16.954 10s (max-interval)