mule udp connection with multicasting - mule

I'm trying to set up a UDP connector in mule and can not figure out how to set to multicast using the configurations.
In the mule documentation there is a separate multicast connector but that is not available in Anypoint Studio.

If your project is Mavenized, you could include the following dependency in the pom.xml to utilize multicasting.
<dependency>
<groupId>org.mule.transports</groupId>
<artifactId>mule-transport-multicast</artifactId>
<version>${mule.version}</version>
</dependency>
Within your configuration, you might use the following for your multicast connector.
<multicast:connector
name="multiCastConnector"
receiveBufferSize="1024"
sendBufferSize="1024"
timeout="0"
keepSendSocketOpen="false"
broadcast="false"
timeToLive="127"
loopback="true"/>
In your flow, you can reference this connector in your UDP endpoint.
connector-ref="multiCastConnector"
You will also need to ensure the following is included in your namespace in the configuration,
xmlns:multicast="http://www.mulesoft.org/schema/mule/multicast"
and in the schemaLocation.
http://www.mulesoft.org/schema/mule/multicast http://www.mulesoft.org/schema/mule/multicast/current/mule-multicast.xsd

Related

Log request event during debug in Mule 4

I want to log an outbound request event (whether it be to http, smb or lambda) before sending it, in debug mode in Anypoint Studio. Is that possible? If yes, how to do it?
For the Mule HTTP connector, and other connectors that use the Mule HTTP service, you can enable HTTP wire logging as you mentioned in your answer, by configuring a log4j2 logger in the log4j2.xml file of the application, or in the logging tab in Runtime Manager. Each Mule version has a specific logger. Please take a look at the KB article How to Enable HTTP Wire Logging for detailed instructions.
Specifically for Mule 4.x applications:
<Loggers>
...
<AsyncLogger name="org.mule.service.http.impl.service.HttpMessageLogger" level="DEBUG" />
...
</Loggers>
For other connectors you will need to check the documentation of said connectors. I'm not sure if you actually intend to debug the protocol of each connector (for example SMB requests) or just want to see if the connector is doing anything. If the former, most connector doesn't provide the same level of protocol detail as the HTTP connector. You might find it more useful to do a traffic capture and use a packet analyzer like Wireshark for that. For the later, it will depend on each connector what they can print with a logger. This KB article provides instructions for some other connectors.
Adding async logger declaration in log4j2.xml can help in this condition.
For example, I used
<Loggers>
...
<AsyncLogger name="org.mule.service.http.impl.service.HttpMessageLogger" level="DEBUG" />
...
</Loggers>
and it helped me for Http and aws-lambda connectors.

HTTP vs. SAP adapters in MFP 7.1

Trying to use the Service Discovery feature of MobileFirst Platform Studio 7.1.0.00-20160323-1606.
The adapter.xml file that gets generated is for an HTTP adapter, not an SAP adapter.
<wl:adapter xmlns:wl="http://www.ibm.com/mfp/integration"
xmlns:http="http://www.ibm.com/mfp/integration/http"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="SAPGWAdapter1">
That also creates the connectionPolicy tag as <connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
This doesn't allow me to add properties that were included with the xsi:type="nwgateway:NWGatewayHTTPConnectionPolicyType" type definition, like <serviceRootURL> and the <serverIdentity> nodes.
Can I change the adapter type back to SAP, or is HTTP the standard now? If it is, how do I pass in the serverIdentity properties? Trying to test the adapter against a live SAP instance is giving me "Unauthorized" errors (at least, I think that's what it says. It's in German...)
-Paul Horan-
We still offer SAP adapters. Use whichever adapter best fits the task.
Create a new Adapter, if you are using the eclipse plugin then right click on adapters > new > MobileFirst Adapter
Under adapter type you have two options
SAP Netweaver Gateway Adapter
SAP JCo Adapter
here is our user documentation on SAP adapters

ActiveMQ persistance Adapter configuration issue

i am new with ActiveMQ version (5.3) I have de following configuration, on the activemq.xml file:
<persistenceAdapter>
<amqPersistenceAdapter syncOnWrite="false" directory="${activemq.base}/data" maxFileLength="20 mb" />
</persistenceAdapter>
And now, i am trying to upgrade to version (5.13) and in this configuration it does not have the element amqPersistenceAdapter please help me to find and element that I can use in version 5.13
amqPersistenceAdapter was replaced with kahadb over the various ActiveMQ releases since 5.3. So take a look at kahadb in the ActiveMQ documentation how to use and configure it. In fact its configured to use kahadb out of the box, so take a look at the vanilla configuration from the ActiveMQ 5.13 release.
http://activemq.apache.org/kahadb.html

WSO2 ESB - Accessing WSDLs, XSDs and XSLTs from ESB directory

We are trying to implement proxy service using WSO2 ESB (4.8.1). The proxy service implementation needs to access wsdls, schemas and xslts.
One option is to put these artifacts in Governance registry. However, we are not planning to connect ESB with database (which is recommended for governance registry). In that case, is there a way I can refer to these files that are residing in the file system along with other ESB artifacts?
Thanks,
You can use the concept call Deployment Synchronizer based on SVN. Deployment Synchronizer provides capability to synchronize deployment artifacts across the nodes of a product cluster.

Seriously confused: has ActiveMQ dropped support for connection pooling?

I'm new to ActiveMQ (we use Apollo for the broker). Everything I read says to use org.apache.activemq.pool.PooledConnectionFactory for connection pool, except that class does not exist in activemq-all-5.5.0.jar. According to jarfinder.com that class only exists in older versions of ActiveMQ.
Do I have to include Spring or something? How does one pool connections?
Thanks
In a standard ActiveMQ distribution you have lib/optional/activemq-pool-5.8.0.jar which contains this class.
Not sure for apollo, but I guess you use the ActiveMQ JMS library for that anyway?
For maven users, this helps:
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client</artifactId>
<version>${activemq.version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-pool</artifactId>
<version>${activemq.version}</version>
</dependency>