Posts

Showing posts with the label MicroServices

JMS Producer Consumer and Publisher Subscriber examples under Spring Boot

 In this article I will present Spring Boot code for a JMS Producer and a Consumer and also for a JMS Publisher and his Subscribers running under security in an Apache Artemis ActiveMQ running with Docker on localhost. While the article is being written, you can access its related code under the following links: GITHUB: Producer's code:  https://github.com/sciencetechworks/jmscommunications Consumer's code: https://github.com/sciencetechworks/jmscommunicationsb   Publisher's code: https://github.com/sciencetechworks/jmspublisher Subscribers' code: https://github.com/sciencetechworks/jmssubscriber Apache Artemis ActiveMQ docker image: https://github.com/vromero/activemq-artemis-docker docker run -it --rm -p 8161:8161 -p 61616:61616 vromero/activemq-artemis Enjoy!

Sending CRUD (POST,GET,UPDATE,DELETE) messages to a Quarkus REST Service from an HTML Page.

Quarkus: Sending CRUD (POST,GET,UPDATE,DELETE) messages to a Quarkus REST Service from an HTML Page. Given the a simple REST Service in Quarkus for basic CRUD operations (Create, Read, Update, Delete) calling the Read operation is as simple as invoking a GET method from an HTML form. On the other hand, invoking Create, Update and Delete normally implies sending an ID and/or some Data to the service. HTML Forms allow basic GET and POST methods, but no UPDATE and DELETE are offered by them. To solve this situation JQuery AJAX calls are necessary. Let the following simple REST service be our target: package org . acme ; import javax . ws . rs . GET ; import javax . ws . rs . POST ; import javax . ws . rs . PUT ; import javax . ws . rs . Path ; import javax . ws . rs . Produces ; import javax . ws . rs . Consumes ; import javax . ws . rs . DELETE ; import javax . ws . rs . core . MediaType ; @ Path ( "/example/crud" ) public class CRUDResource { @ GET @ Produc...