Hazelcast client subscriber not receiving message - java

We are running Hazelcast Java client app in one docker container & hazelcast server with single member in other container on same machine.
Our client app is able to connect to hz server container & play around with data but pub/sub is not working.
Both pub/sub threads are running in client app itself. Data is getting published as it can be seen in Hazelcast management center but it's not getting received.
Does anyone have any idea about this?
PS: We are using hazelcast v5.1.3 with default server & client config.

We resolved this issue by replacing hazelcast-5.3.1 jar with hazelcast-client-4.x jar in our client app docker image.
Posting an answer here just in case if someone faces similar issue.

Related

Requesting API service from docker container fails

I have a docker container running java program, which is using API service of a third party. When I run the jar file on ec2 machine, it works well and gets connected to service and fetches the data also but when I containerize the jar file, it doesn't connect to the API service. API service exposes itself on port 14002. I do understand that container can send the things out but cant receive anything unless we tell it to do.
Can anybody tell me, how do I tell my java program to get the service of API running on 14002 port?
Thanks
thanks all for your comments here. I was able to resolve this issue, simply by changing the base image from FROM openjdk:8-jdk-alpine to FROM openjdk:8-jdk. In the alpine image, I was not able to ping the api dns from inside the container usining telnet. But after changing it to only openjdk:8-jdk, I was able to ping the external dns. So it was the issue in image

eclipse weblogic outbound calls

In Eclipse we have configured weblogic server and we have deployed the java application. How to trace all the call with request and reponse made by the weblogic server like wireshark. since my company wont allow the wireshark to install, I need alternative for wireshark.
Any help will be appreciated.
You can trace network traffic on your VMs in Azure by using Packet Capture, which his a feature provided by a service called Network Watcher. Packet Captures created by Network Watcher can be saved to your blob storage account or locally on the VM, and the tool works for Windows and Linux.
Packet Capture Overview
Network Watcher Overview

Kafka usage on Google appengine to push messages-Is it possible?

I am trying to push messages from webApplication server hosted on Google AppEngine to the kafka cluster running on my local machine. Is there any one who did this? I am facing an issue while creating KafkaProducer instance to send the messages. I am using Kafka_0.8.2. It gives error, "javax.management.ObjectName is a restricted class" and which as per AppEngine's whitelist, its restricted. What is the alternative for this? Can anyone answer? Thanks.

GAE: MQTT broker

So I was wondering if it's possible to run a MQTT broker on the Google App Engine platform?
Couldn't find any information about it (or maybe I might be using the wrong keywords).
I've got my GAE running on Java so I'd like to go into direction of running the MQTT broker on GAE using a backend.
EDIT:
Did some further research and it seems Moquette is running on Java. Does someone have experience running Moquette on the GAE?
EDIT2:
Ok, it seems the examples of Moquette are running using an OSGi container, which is unavailble in GAE. Looking for a script to start this server on GAE.
MQTT is protocol on top of TCP. In order to run MQTT server, one needs to be able to open a listening socket. Those are still not supported on normal AppEngine instances.
Note: GAE backends have been replaced: now you just have automatic scaled (aka frontend) instances and manual scaled (aka backend) instances.
Back to your problem: Managed VMs have most of the benefits of GAE (access to services), but run a full JVM, which allows listening sockets.
An alternative to Moquette would also be the HiveMQ broker, it also runs on Java and can be easily installed. All the documentation is available here.
We haven't tested it on GAE yet, but if you have any problems running it, you could ask in the support forum.
Update: If Peter Knego is right, then HiveMQ or any other MQTT broker won't work on GAE.
Full disclose: I'm working for the company, who develops HiveMQ.
Cheers,
Christian
#Peter Knego is definitely right, and all i would add to his answer is that,
If you manage to configure you application to use a custom Runtime on the Managed Vms of Appengine and Compute Engine,
then you will be able to run you MQTT brooker perfectly sound and well.
As long as you define a fire wall to allow a tcp connection at the port which your broker is listening from.
By default the ports are blocked for security reasons.

ZeroMQ PUB/SUB not working on same machine on different JVM

I am using Zero MQ PUB/SUB model where PUB and SUB are two different applications deployed on the same machine on webpshere 6.1. This model works fine on my local machine but when I deploy it on a remote unix box server it isn't working. My SUB never receives a message from PUB. I tried all the options suggested i could find on the web (localhost, 127.0.0.1) but no luck. Appreciate any help on this. I am using jeroMq 3.2.2.
Thanks
Akash
If you're using multicast, then you need to enable loopback on the socket. As a result of this, the sender app will get the data as well if it's listening for it.
We also faced same issue and it was fixed by using below settings:
Publisher side use * (star) : tcp:// *.port number
Subscriber side use machine name : tcp://machine name of publisher.port number

Categories

Resources