Configure the cMessagingEndpoint component as a Camel
Log component.
"log:AuditLog?showAll=true&multiline=true"
The Audit Service will now listen to the Queue audit
and will log it on the console. This message can be saved to the database
for auditing purposes. You can run the route to verify that it compiles and
runs correctly at this point.
To export the Audit Service as a Microservice, in the
Deployment tab of the Route view,
select Microservice in the Build Type
list. Save the Route.
In the Repository tree view, right click the Route and
select Build Route.
The build type is set to Microservices. Click
Finish to export the Route.
To run Microservice, locate the 'Audit****.jar file where you have saved it and
run it using java -jar command.
java -jar AuditService_0.1.jar --server.port=8066
By default, the monitoring port is 8605 which can be overwritten by passing
simple parameter --server.port=port to the java command starting the
service.
This port is used to monitor the status of the service and is discussed in
next section.
The microservice can be exported as a zip file that contains the Windows and
Linux scripts (.bat and .sh) to help with starting up the microservice.
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!