-
Notifications
You must be signed in to change notification settings - Fork 1
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
Some questions regarding how to use this lib #201
Comments
Hi Xin, We discussed the issue with the shim and decided to offer an option to skip the initialization of the event queue in the shim. This ensures that the event queue is not initialized twice. If you skip the initialization in the shim, you can initialize the module in your project. However, ensure that you incorporate the events defined in the shim into your own event queue configuration. Regarding your second question: I hope this answers your questions. If not, feel free to reach out. Best regards, |
Hi @soccermax , Thank you for the information; it's really helpful. Please find below my additional questions:
![]() Bcause when i install the lib, the cds env for event-queue is Even i do not config event-queue in my package.json
Thank you. |
Hi Xin, there is a new shim version (cds-shim: 0.5.48) with a new env option (process.env.EVENT_QUEUE_CUSTOM_INIT). You can use this option to init the event-queue your self, but as said copy over the shim events into your own config file. Regarding the empty event-queue config it seems that cds changed there behaviour regarding this or this happens in combination with shim. Let me test this. But if you init the event-queue yourself you can simply do it via plugin. But nevertheless this should also work via coding, I'll check this. Regarding App A and B, this case is not implemented yet. But this is not a big thing, if I find some time next week I'll start/do it. events:
- type: Email
subType: Task
impl: ./srv/util-service/mail-service/business/EventQueueNotificationProcessor
load: 1
appNames:
- app-a
- type: Fiori
subType: Task
impl: ./srv/util-service/mail-service/business/EventQueueNotificationProcessor
load: 1
appNames:
- app-b |
Hi Max, For the case App A and App B, the config looks good. So does this mean once i publish the message, it should specify the consumer/processor ?
Thanks. |
No the idea is that you specify this in the configuration like in the example above. events:
- type: Email
subType: Task
impl: ./srv/util-service/mail-service/business/EventQueueNotificationProcessor
load: 1
appNames:
- app-a
- type: Fiori
subType: Task
impl: ./srv/util-service/mail-service/business/EventQueueNotificationProcessor
load: 1
appNames:
- app-b Would this work for you? |
Hi Max, Then no matter the Email Task event is pulished in app-a , app-b, or even app-c, the process of this task will only happen in app-a. |
yes exactly. I'll implement that in the near future, Thanks for the input |
Hi Colleagues
But there is error when init
![image](https://private-user-images.githubusercontent.com/12246583/341019713-4bb1ce30-d2bd-4f67-a9c8-3fe962aac7dd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5OTI1NjIsIm5iZiI6MTcxOTk5MjI2MiwicGF0aCI6Ii8xMjI0NjU4My8zNDEwMTk3MTMtNGJiMWNlMzAtZDJiZC00ZjY3LWE5YzgtM2ZlOTYyYWFjN2RkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzAzVDA3Mzc0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg5MjRiODY4Yzk3Yjc2Nzg0NmVjNDE2YTM1MjA2NGQwY2I5OTRhNzJjYTc3YWUwNTlmYjExMjVhODljMWMwNjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.CH_xXb53INbWhNpkqtQEa2l9UF9h2NrA_zM5hly_rW0)
Then the coding level initialization is not successed, because it will anyway return saying that init is done,
Question:
Does this mean there is only ONE chance to init the event-queue?
but we have case like: we use cds-shim, in cds-shim, there is event initialized, but we also want to initialized by our own event but in case the config file from cds.eventQueue. configFilePath is initialized, the cds-shim's event will not register
Does this support multiple event init or register
Like publishing event from service A, and consumption in service B
it needs to init the event for both sevice A and B, but A will set i
sEventQueueActive
false, and B fortrue
, correct ?Any other points needs to be taken care ?
Many thanks for your help.
Regards,
Xin
The text was updated successfully, but these errors were encountered: