We are trying to connect a process within our AS400 to deliver information to a database that is in SQL Server 2016. We have an Apache Kafka server running and ready. What is the best way to connect the i Series to SQL Server using Apache Kafka? in such a way that an RPGLE program can deliver a message subscribed to a specific topic in Kafka.
Should we install something additional? are there open source options?
What should we configure?
I suspect this should probably be closed...
But, I'll throw the following out here....
There's various ways for RPG to interact with REST services
open source HTTP API
IBM's own Integrated Web Services (IWS) client
Db2 built in functionality
various commercial libraries (GETURI for example)
Rather than interact directly from the producing RPGLE program, it's likely a better idea to have the RPG drop a message on a queue and have some background process send it out.
That background process could be all RPG, all Java, or RPG using Java classes.
JTOpen, aka JT400,is the opensource version of the IBM i Toolbox for Java.
If for instance you wanted an all Java process to read from the queue and send a message.
You can even throw Apache Camel into the mix since it supports both a JT400 and Kalfka connector. Here's an example repo of showing Camel running on the IBM i reading from a data queue and sending to Kalfka.
Related
I am working on a small project in which I want to consume the messages from the Jboss JMS Queue using IIB Tool kit. Apologize me that I am a learner in IIB.
The scenario is as below.
The Linux server is where the JBOSS is running and the messages are available in a particular JMS queue. I got IBM Toolkit installed on my laptop/machine and created an application and a flow. I placed the JMSInput from the pallet and got confused on where to configure the connection properties like IP Address, port number, Jboss user, password etc...
The idea is to consume the messages that are available in Linux server using IIB. Request some expert help on how to configure and achieve this requirement.
The jnp based Initial Context Factory seems like not supported in JBOSS 7 anymore. I would use the one described in Remote JNDI Lookup.
I never did an IIB integration with a JMS provider in JBoss, but I did it with a standalone ActiveMQ. There I created a JMSProviders configurable service, where I could configure IP address and port in the jndiBindingsLocation property like this:
mqsicreateconfigurableservice <BROKER> -c JMSProviders -o ActiveMQ \
-n initialContextFactory,jarsURL,jndiBindingsLocation,connectionFactoryName \
-v org.apache.activemq.jndi.ActiveMQInitialContextFactory,c:\Users\daniel\apache-activemq-5.11.1\lib,tcp://localhost:61616,ConnectionFactory
See Securing JMS connections and JNDI lookups how to enter user id and password.
I have server A which runs under Windows (C#), I have server B which runs under Linux (Java). I need to setup a fast and reliable way of interaction between these two servers.
Requirements:
The size of data is small (many small messages of kbyte or something)
The rate is 1 message per second at least; good to have 1 per ms
The order should be preserved
Persistency not required
Delivery confirmation - yes
Some options out of my head:
Kafka / other messaging systems. The downsize is that I have to use a
middleware in a form of server.
Use Cloud queues from AWS or other cloud service. Can be costly?
Own messaging via TCP messages (very time consuming, I guess there
are open-source alternatives). No middleware.
Somehow via shared filesystem?
Setup Linux Server on Windows and.. what? Any special options if
applications are sharing same host?
I have a use case where MSMQ server is running in our clients infrastructure and we have to receive messages sent by them on the MSMQ queue. I know MSMQ is a windows based system and will work best with windows but is there a way I can just get the messages in Linux ?
Thanks,
Anuj
The typical way to solve it is to bridge to some multi platform messaging product. ActiveMQ, RabbitMQ or whatnot. For that you probably need to write a small bridge service on a Windows server. So that all messages are relayed through "the multi platform broker".
I am having an incredibly difficult time finding any information by IBM on how to connect to our company's queue. Some more specific questions:
do I need the queue manage?
how do I know which queue connection factory to use?
how do I connect to the queue from a standalone java application?
I honestly can't find any MODERN, up-to-date resources explaining the websphere mq and how to make use of it (this includes within my own company).
Thanks!
You can connect to a queue manager in either binding mode or client mode. Binding mode allows an application to connect to the queue manager only when they are both running on the same machine. Client mode allows an application to connect to the queue manager when the two a running on separate machines. You can use client mode when they are both running on the same machine but its not as efficient as binding mode.
If you want to use binding mode then you only need to know the queue manager name.
If you want to use client mode then you will need to know the queue manager name, hostname, listener port number, and channel name.
The following URL provides some information on using JMS to connect to MQ:
http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q031500_.htm
Recently I need to develop JBOSS application which receives IBM MQ Message.
It seems like use wmq.jmsra.rar and Message Driven Bean is a most common solution.
But I'm a little bit uncertain who is responsible of this Resouce.
IBM? or Redhat?
I'd rather develop my own queue connector daemon which read message from IBM MQ and send to JBOSS MDB using JMS.
In this case, I need 2 phase commit, to commit simultaneously both IBM MQ side and JBOSS side. Can I use something like XATransaction on this process? Is there any example on Web if it's possible.
Sorry, I couldn't find any example so far.
Many thanks.
wmq.jmsa.rar is released by IBM. Its found as part of the product. Go with the latest release WMQ 7.5 if possible.
WMQ supports XA transaction. It can participate as a resource manager in a 2 phase transaction coordinated by an external transaction monitor/application server.
Sample programs for Java XA transaction are not found with the installation. (I know I have seen C and Cobol XA samples).
http://pic.dhe.ibm.com/infocenter/wmqv7/v7r5/index.jsp?topic=%2Fcom.ibm.mq.dev.doc%2Fq023590_.htm
http://pic.dhe.ibm.com/infocenter/wmqv7/v7r5/index.jsp?topic=%2Fcom.ibm.mq.dev.doc%2Fq031500_.htm
You will require a local qmgr (application should run on the same server as qmgr to connect in bindings mode) or extended transactional client to connect to a remote qmgr using XA transactions.