Skip to content

updated the service plan related info from dev to default #4

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ Direct integration with SAP S/4HANA Business Event Handling allows efficient dev

This repository provides documentation and samples of how to use the Messaging Client (Node.js) for messaging via SAP Cloud Platform Enterprise Messaging in the Cloud Foundry environment. Details on each sample application and the covered scenario are described in the table _List of content and sample projects_ below.

For more details of **SAP Cloud Platform Enterprise Messaging** take a look at the [Enterprise Messaging - Messaging Clients landing page](https://github.com/pages/SAP/enterprise-messaging-samples/) and [SAP Cloud Platform Enterprise Messaging on SAP Help portal](https://help.sap.com/viewer/product/SAP_ENTERPRISE_MESSAGING/Cloud/en-US).
For more details of SAP Cloud Platform Enterprise Messaging take a look at the [SAP Cloud Platform Enterprise Messaging on SAP Help portal](https://help.sap.com/viewer/product/SAP_ENTERPRISE_MESSAGING/Cloud/en-US).

This repository provides samples of how to use the Messaging Client (Node.js) for messaging via SAP Cloud Platform Enterprise Messaging in the Cloud Foundry environment.

## List of content and sample projects

|Sample/Content|Scenario|Scenario Description|
|---|---|---|
|[xb-msg-amqp-v100-doc](xb-msg-amqp-v100-doc)|Node.js Messaging Client documentation (includes basic sample)|Documentation and related samples which shows hot this library provides a messaging client as well as classes to realize a server for `AMQP 1.0`|
|[xb-msg-amqp-v100-doc](xb-msg-amqp-v100-doc)|Node.js Messaging Client documentation (includes basic sample)|Documentation and related samples which shows how this library provides a messaging client as well as classes to realize a server for `AMQP 1.0`|
|[xb-msg-amqp-v100-samples](xb-msg-amqp-v100-samples)|Basic Messaging Sample which runs locally|This sample demonstrates how each application (plain Node.js, non SAP CP) can use the _Enterprise Messaging Client_ to send and receive messages via _SAP Cloud Platform Enterprise Messaging_. Therefore the messaging sample consists of a `consumer.js` and a `producer.js` which provides the corresponding functionality for send/receive (and the `config/cf-sample-config.js` to configure the sample)|
|[event-simulator](event-simulator)|Event Simulator for SAP CP deployment|The Event Simulator application demonstrates a scenario where events are emitted and send as messages via Enterprise Messaging which were consumed and further processed (i.e. logged via console). Therefore the messaging sample consists of a `main.js` which provides the corresponding functionality and start the simulation (and a `config.js` to configure the sample)|

Expand Down
6 changes: 4 additions & 2 deletions xb-msg-amqp-v100-samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ Sample application (plain Node.js) of how to use the _Enterprise Messaging Clien
This section includes the _Prerequisite_, describe _how to install_ and _how to configure_ this basic sample.

1. Prerequisite: Enable Enterprise Messaging on _SAP CP_
1. Create required _Enterprise Messaging_ service via e.g. `cf cs enterprise-messaging dev enterprise-messaging-service-instance-name -c '{"emname":"sample_application"}'`
1. Create service key via e.g. `cf csk enterprise-messaging-service-instance-name key-name -c '{"emname":"sample_application"}'`
1. Create required _Enterprise Messaging_ service via e.g. `cf cs enterprise-messaging default enterprise-messaging-service-instance-name -c config/descriptor.json'`
1. Create service key via e.g. `cf csk enterprise-messaging-service-instance-name key-name -c config/descriptor.json'`
1. Get key via e.g. `cf service-key enterprise-messaging-service-instance-name key-name`
1. Update the `config/cf-sample-config.js` with information of the _service key_
1. More info regarding enterprise messaging serviceinstance creation is available [here](https://help.sap.com/viewer/bf82e6b26456494cbdd197057c09979f/Cloud/en-US/d0483a9e38434f23a4579d6fcc72654b.html)

1. Install required dependencies via `npm install`
1. Run sample application
1. Start producer via `npm run-script producer` (default) or via `node src/producer.js ../config/cf-sample-config.js` (with given config file)
Expand Down
28 changes: 28 additions & 0 deletions xb-msg-amqp-v100-samples/config/descriptor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"emname": "myapp",
"namespace": "myorg/myapp/myid",
"version": "1.1.0",
"options": {
"management": true,
"messagingrest": true,
"messaging": true
},
"rules": {
"queueRules": {
"publishFilter": [
"${namespace}/*"
],
"subscribeFilter": [
"${namespace}/*"
]
},
"topicRules": {
"publishFilter": [
"${namespace}/*"
],
"subscribeFilter": [
"${namespace}/*"
]
}
}
}