I'm new to Kafka and came up with a problem. Our Kafka cluster is accessible only through the Kafka REST proxy and is not available to be accessed directly. There are numerous APIs to access Kafka from Java, but is there a Java Wrapper around Kafka REST Proxy API?
By Java Wrappers I mean Java libraries using REST Proxy API, not Kafka native protocol.
Related
How shall we install kafka rest proxy for an existing kafka server or cluster. Also is there any apache kafka rest proxy as well with confluent kafka rest proxy ? Please let me know the steps or some clarity on how shall I go ahead to use both of them or either of them.
It is asking to download the whole confluent platform, please provide those steps as well for rest proxy.
If I want to send messages to Kafka or consume messages from Kafka. Would you recommend using Spring Kafka library or just using Kafka Java API.
In Spring they provide a lot of annotations which seems more magics when having some runtime error.
Can someone differentiate between Spring Kafka and Kafka.
I'm new to Elastic search. We are building a Spring boot application with Elastic search.
For integrating my Spring boot application either we can use elasticsearch-rest-high-level-client or spring-boot-starter-data-elasticsearch.
Can anyone please elaborate on which option would be overall better and why?
spring-boot-starter-data-elasticsearch internally can use the transport(soon to be deprecated in ES 8.X) or rest-high-level-client Please refer elasticsearch client section for more information and how to configure them.
And from the same link :
Spring data Elasticsearch operates upon an Elasticsearch client that
is connected to a single Elasticsearch node or a cluster. Although the
Elasticsearch Client can be used to work with the cluster,
applications using Spring Data Elasticsearch normally use the higher
level abstractions of Elasticsearch Operations and Elasticsearch
Repositories.
Bottom line is that you can directly use rest-high-level client in your spring boot application but if you want more abstraction then you can use the spring-boot-starter-data-elasticsearch dependency and use its method which provides more abstraction although internally it would use the client offered by Elasticsearch.
Does any of you know any approach or tools to implement Consumer Driven Contracts with SOAP web services? I have a legacy Java application that publishes SOAP web services, implemented with Apache CXF, which are consumed by a bunch of Spring Boot Java microservices. I’m already using Pact and Spring Cloud Contract to test my REST calls between the microservices, but could not find a way to use these same tools, or any other, for SOAP web services.
There is JavaSeifenBenutzer
a project to create Soap/Xml support for pact-jvm via a reverse proxy that converts XML to JSON and vice versa
You can use Spring Cloud Contract with MockMvc and RestDocs to build stubs of the XML service. Then you have to package the stubs in a jar for other people to reuse it and that's it.
I'd like to use the Java Message Service but it says it's for the Java EE Platform. Is there a way to port it to a regular Java application (which I'm working on in Eclipse)?
JMS is part of the Java EE spec, but you can use it from any Java application. Depending on your needs, you may have to run a standalone broker, but this is just like running a regular daemon (or Windows service).
Yes, you absolutely can use JMS from a J2SE application. In fact, you can access a JMS broker from programs not written in Java at all. The ActiveMQ JMS server includes several transport connectors. The connectors allow clients to interact with ActiveMQ using different communication protocols. Most Java clients use the openwire connector. I've written a PHP client that used the STOMP protocol with great success. It consumed messages sent to a JMS Queue by a Java application running in the Tomcat Servlet Container.
This is a much more complicated question than the answer would indicate. Jms is a spec. Really just a set of interfaces. You can absolutley use those interfaces from a standalone java process. Hell you could write your own jms compliant messaging implementation. Questions you should be asking yourself is what messaging implementation will i be using and does it support jms? Even after answering that there are numerous caveats to take into account when connecting to brokers outside of a container including but not limited to transactionality, load balancing, connection pooling, and high availability. You should be very clear about what your trying to do and what messaging vendor you are working with before you can answer this completely
Many Messaging servers also provides their java api for the communication like MQ, open source Apache ActiveMQ. In that case you don't realy need to worry about JMS. You simply need to understand and use that API.