SAP Notifications¶
The seal-co-notifier
service uses the NATS key-value store to cache the current SAP systems and device configurations for the whole cluster.
Data Structure of the Buckets¶
The key-value store uses buckets to store the key-value pairs. seal-co-notifier
service creates five buckets.
co-notifier-reply-groups
¶
The bucket contains the SAP RGM
(Reply Message Group) configurations received from the SAP BCXOM function SXMI_XOM_RMGS_QUERY
.
- key: SAP system destination (normally 3 characters) in base64 encoded format
-
value: JSON object with the following structure:
{ "ROMS_NAME": { "OMSFLAGS":"10.10.10.69 631 PLOSSYS IPP", "R3FLAGS":" XX X", "RECONFIG":"030", "ROMS":"ROMS_NAME", "REPLY_GROUPS": [ { "RMGID":"CDN1LOMS", "CALLBTRGT":"SAPSAPSAP_DN1"," JCALLBIV":"020", "JCALLBAMNT":"100", "DCALLBIV":"010", "DCALLBAMNT":"050", "RETRYIV":"120", "R3FLAGS":"05 XX XX", "OMSFLAGS":"" } ] } }
co-notifier-printer-sap
¶
The bucket contains the SAP device configurations received from the SAP BCXOM function SXMI_XOM_DEVICES_QUERY
.
- key: SAP destination name in base64 encoded format
-
value: JSON object with the following structure:
{ "ROMS_NAME": [ {"DEST": "printer1", "RMGID": "RMGID1"}, {"DEST": "printer2", "RMGID": "RMGID1"} ], "ROMS_NAME2": [ {"DEST": "printer3", "RMGID": "RMGID3"}, {"DEST": "printer4", "RMGID": "RMGID4"} ] }
co-notifier-printer-mappings
¶
The bucket contains the mapping of the PLOSSYS Output Engine printer names to the SAP device names. This is used to send the correct device notifications to the respective SAP system.
- key: Output Engine printer name in base64 encoded format
-
value: JSON object with the following structure:
{ "printerName": "printer1", "destinations": { "DN1": { "roms": "ROMS_NAME", "rmgid": "RMGID1" }, "DN2": { "roms": "ROMS_BANE", "rmgid": "RMGID7" } } }
co-notifier-job-counters
¶
The bucket contains the job counters for each SAP system RMGID (Reply Message Group ID). These are used to realize the JCALLBAMNT
parameter of a LOMS
(Logical Output Management System). Once the job counter has reached the configured value the co-notifier
will send all job notifications to the respective SAP system. The job counter is decreased by the number of sent notifications after successful transmission.
- key: SAP system RMGID (Reply Message Group ID) in base64 encoded format
-
value: JSON object with the following structure:
{ "roms": "ROMS_NAME", "counter": 42 }
co-notifier-device-counters
¶
The bucket contains the device counters for each SAP system RMGID (Reply Message Group ID). These are used to realize the DCALLBAMNT
parameter of a LOMS
(Logical Output Management System). Once the device counter has reached the configured value the co-notifier
will send all device notifications to the respective SAP system. The device counter is decreased by the number of sent notifications after successful transmission.
- key: SAP system RMGID (Reply Message Group ID) in base64 encoded format
-
value: JSON object with the following structure:
{ "roms": "ROMS_NAME", "counter": 69 }
Debug the Buckets¶
Watch the Buckets¶
You can use NATS CLI to watch the buckets and see the current values by using the nats kv watch
command.
Example - watch the co-notifier-job-counters
bucket
nats kv watch co-notifier-job-counters
Clear the Cache¶
In some cases, you may want to clear the cache of co-notifier
service. Clearing the cache will remove all entries from the buckets and force the co-notifier
to re-fetch the configurations from the SAP systems.
Clearing the cache should not affect in-flight notifications, but it may lead to temporary delays in notification transmissions until the cache is repopulated.
Caution - clear the cache
It is recommended to stop all instances of seal-co-notifier
service before clearing the cache. This will prevent unplanned restarts of the service or in rare cases retransmission of in-flight notifications.
Using the NATS CLI command nats kv delete
you can delete singular entries or clear the entire bucket. You need to confirm the deletion by typing y
when prompted.
Example - delete a specific entry in the co-notifier-job-counters
bucket
nats kv delete co-notifier-job-counters BASE64_ENCODED_RMGID
Example - delete the entire bucket co-notifier-job-counters
nats kv del co-notifier-job-counters