This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php dispatch.php logging-exchange logs.info "Application started" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Establish a connection to the locally running RabbitMQ instance | |
$cnn = new AMQPConnection(); | |
$cnn->connect(); | |
// Create a channel | |
$ch = new AMQPChannel($cnn); | |
// Declare the exchange specified by the first argument to the script |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<amqp:connector name="amqpConnector" /> | |
<flow name="logging.wildcard"> | |
<amqp:inbound-endpoint | |
exchangeName="logging-exchange" | |
exchangeType="topic" | |
exchangeAutoDelete="false" | |
exchangeDurable="true" | |
queueName="console-logger" | |
queueDurable="true" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mule.example.cep; | |
import org.mule.api.MuleMessage; | |
import org.mule.api.MuleMessageCollection; | |
import org.mule.api.client.MuleClient; | |
import org.mule.tck.FunctionalTestCase; | |
import org.mule.util.CollectionUtils; | |
import java.util.*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<queued-asynchronous-processing-strategy name="allow500Threads" maxThreads="500"/> | |
<flow name="acceptOrders" processingStrategy="allow500Threads"> | |
<vm:inbound-endpoint path="acceptOrders" exchange-pattern="one-way"/> | |
<vm:outbound-endpoint path="commonProcessing" exchange-pattern="one-way"/> | |
</flow> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<flow name="aggregate.chunks"> | |
<vm:inbound-endpoint path="foo.bar"/> | |
<message-chunk-aggregator/> | |
<vm:outbound-endpint path="chunk.out"/> | |
</flow> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<collection-splitter/> | |
<jms:outbound-endpoint queue="order.queue"/> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<flow name="aggregate.messages"> | |
<vm:inbound-endpoint path="foo.bar" exchange-pattern=”one-way”/> | |
<collection-aggregator timeout="6000" failOnTimeout="false"/> | |
<vm:outbound-endpoint path="messages.out"/> | |
</flow> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<flow name="HTTP to JMS Flow"> | |
<http:inbound-endpoint address="http://localhost:8080/foo" exchange-pattern="one-way"/> | |
<jms:outbound-endpoint queue="messages"/> | |
</flow> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DelayingOutboundRouter extends AbstractOutboundRouter { | |
static ScheduledExecutorService executorService = Executors.newScheduledThreadPool(5); | |
@Override | |
protected MuleEvent route(MuleEvent event) throws MessagingException { | |
Future<MuleEvent> scheduled = executorService.schedule( | |
new MessageProcessorRunner(event.getMessage(), routes.get(0), event), 5, TimeUnit.SECONDS); | |
MuleEvent result; |