on 03-27-2023 1:51 PM
Hello,
trying to find out how to emit messages using the messaging service (com.sap.cds.services.messaging.MessagingService) to Event Mesh and setting a time to live in Java.
Hi slithzerikai
you can refer CAP Java Documentation for messaging mostly time to live will be set in Queue Configuration as maxTtl called as Expiration Period. If would like to override in application it can be set using config similar to below
note respectTtl should be true
cds:
messaging:
services:
- name: "messaging"
queue:
name: "my-queue"
config:
maxTtl: 300,
respectTtl: true
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I get a "We're sorry, but this content is not accessible." in the second link you provided, which is also linked from the first.
I had tried this in my configuration but it was ignored. I have now figured out the problem, the max TTL and the respect TTL are not properties of the 'queue' property but of the 'config' property, which is a property of the queue...
cds:
messaging:
services:
- name: "messaging"
queue:
name: "my-queue"
config:
maxTtl: 300
respectTtl: true
Can I accept my own answer as 'the answer'? 🙂
SAP Event Mesh - REST APIs for Messaging Management
above is second link should work, sure if you are able to solve the issue thats great.
User | Count |
---|---|
69 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.