Kongsberg Maritime Software Engineer Recruitment Task
.NET program uses Microsoft Azure Service Bus Topics and Services to gather sensor messages and pass them through to receivers.
Node.js script using Express, TypeScript and @azure/service-bus package for MS Azure Service Bus connection.
Node.js version: v20.12.2
npm version: 10.5.0
There's service bus with one Topic created in the Azure portal. The Topic has 3 Subscriptions set up, one for each sensor. Each Subscription use correlation filter which evaluates messageId key and its value.
- Input application secrets for
Microsoft.Extensions.Configuration
insecrets.json
file.
{
"namespaceConnectionString": "<CONNECTION_STRING>",
"topicName": "<TOPIC_NAME>"
}
- Build the solution and run it.
- The console will appear informing which baches of data has been sent to Service Bus.
- Copy
.env_default
file and change its name to.env
. - Input port on wich you want your app to be run on (
3000
is default) and application secrets in.env
file. - Go inside
node
folder and run:
npm install
npm run dev
- If the .NET application is running and sending messages, then Node.js app will log received sensor messages in the console.