Enterprise Messaging with Apache ActiveMQ


Enterprise Messaging with Apache ActiveMQ James Strachan http://macstrac.blogspot.com/ http://open.iona.com/ What is messaging? Messaging 101 Topics Queues What is Apache ActiveMQ? What is Apache ActiveMQ http://activemq.apache.org/ Clients C Java Pike C++ JavaScript Python C#/.NET Perl Ruby Flash PHP Smalltalk Selectors • Provide content based filtering on messages using SQL 92 syntax • Customer = ‘gold’ and product in (1, 2, 3) and JMSPriority > 5 • Supports XPath on the message body for XML messages Wildcards •Products.Books.Computing.EIP •Products.Books.Computing.* •Products.> Broker Architecture Message Persistence Security Transports URIs ://:? Examples tcp://localhost:61616 vm://localhost?broker.persistent=false Failover failover:(tcp://host1:61616,tcp://host2:61616)?initialReconnectDelay=100 Wire Formats •OpenWire •STOMP •HTTP / REST Wire Formats: OpenWire •binary •small and fast •code generated marshalling in C, C++, C# and Java •a fair amount of work to port to other languages Wire Formats: STOMP •text based for the headers like HTTP •very easy to create a client in any language •tons of clients in most popular programming languages Stomp : Connecting CONNECT login: passcode: ^@ Stomp : Sending SEND destination:/queue/orders.books reply-to:/temporaryQueue/James correlation-id:4324234 amazonSecurityToken:abc234 amazonCustomerRating:gold ^@ Stomp: Subscribe SUBSCRIBE destination:/queue/orders.books ^@ Stomp : Receive messages MESSAGE destination:/queue/orders.books Message-id:abc123 reply-to:/temporaryQueue/james134 This is the message ^@ Broker Architecture Types of connectors Kinds of topology Kinds of topology Kinds of topology Clustering with Master / Slave •Pure •Shared File System •Shared Database Cool Stuff! Monitoring Easy Unit Testing of JMS code ConnectionFactory factory = new ActiveMQConnectionFactory(“vm://localhost?broker.persistent=false”); Visualisation Prefetch new ActiveMQQueue("TEST.QUEUE?consumer.prefetchSize=10"); Exclusive Consumers Message Groups Total Ordering Consumer Priority new ActiveMQQueue("TEST.QUEUE?consumer.priority=10"); Virtual Destinations Mirrored Queues Enterprise Integration Patterns via Camel http://activemq.apache.org/camel/ Bridge to other protocols http://activemq.apache.org/camel/components.html activemq ibatis mail rmi udp activemq.journal imap mina rnc validation bean irc mock rng velocity cxf jdbc msv seda vm direct jetty multicast sftp xmpp event jbi pojo smtp xquery file jms pop string-template xslt ftp jpa quartz timer webdav http log queue tcp Example /quote/product = ‘widget’ Where do I get more info? http://activemq.apache.org/ Questions? James Strachan blog http://macstrac.blogspot.com/
还剩45页未读

继续阅读

下载pdf到电脑,查找使用更方便

pdf的实际排版效果,会与网站的显示效果略有不同!!

需要 5 金币 [ 分享pdf获得金币 ] 0 人已下载

下载pdf

pdf贡献者

ymxbnu

贡献于2015-07-13

下载需要 5 金币 [金币充值 ]
亲,您也可以通过 分享原创pdf 来获得金币奖励!
下载pdf