Habari Active Mq Getting Started

  • View
    224

  • Download
    5

Embed Size (px)

Text of Habari Active Mq Getting Started

  • Getting started with

    Habari Client for ActiveMQVersion 3.7

    Trademarks

    Habari is a registered trademark of Michael Justin and is protected by the laws of Germany and other countries. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Embarcadero, the Embarcadero Technologies logos and all other Embarcadero Technologies product or service names are trademarks, service marks, and/or registered trademarks of Embarcadero Technologies, Inc. and are protected by the laws of the United States and other countries. Microsoft, Windows, Windows NT, and/or other Microsoft products referenced herein are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Other brands and their products are trademarks of their respective holders.

  • 2 Habari Client for ActiveMQ 3.7

    ContentsIntroduction..........................................................................................5

    About Habari Client Libraries............................................................................5How can I use Habari Client for ActiveMQ?.......................................................5

    What's new in version 3.7?...................................................................8New..................................................................................................................8Changed.........................................................................................................10Fixed..............................................................................................................10Broker specific changes..................................................................................11

    Installation.........................................................................................12Requirements.................................................................................................12TCP/IP Communication Libraries....................................................................12

    Starting ActiveMQ...............................................................................13Running the Broker........................................................................................13Monitoring ActiveMQ......................................................................................14Stopping ActiveMQ.........................................................................................14

    Communication Adapters....................................................................15Introduction...................................................................................................15

    The Programming Model.....................................................................18

    Connections and Sessions...................................................................19Step-by-Step Example....................................................................................19Session types overview..................................................................................21Connection URL parameters...........................................................................22Transacted Sessions.......................................................................................24Failover Support.............................................................................................26Pooled Connection Factory.............................................................................27

    Destinations........................................................................................29Introduction...................................................................................................29Create a new Destination...............................................................................29Destination Options........................................................................................30

    Producer and Consumer......................................................................32Message Producer..........................................................................................32Message Consumer.........................................................................................32JMS Selectors.................................................................................................33Using XPath to filter messages.......................................................................33

    Text Messages.....................................................................................35Sending a TextMessage..................................................................................35Receive Text Messages...................................................................................35

    Binary Messages.................................................................................38Send Binary Messages....................................................................................38

    Object Messages.................................................................................39Introduction...................................................................................................39

  • 3Message Transformers in Habari Client for ActiveMQ......................................41Code Examples...............................................................................................41

    Map Messages.....................................................................................45Introduction...................................................................................................45

    Durable Subscriptions.........................................................................47Description.....................................................................................................47Virtual Destinations........................................................................................48

    Stomp 1.1............................................................................................49Connection Configuration...............................................................................49SendHeartbart: sending client-side heartbeat signals....................................50CheckHeartbeat: checking for server-side heartbeats....................................51ReceiveHeartbeat: reading server-side heartbeats.........................................51

    Example Applications..........................................................................52Broker-independent example projects............................................................53Broker-specific preparation............................................................................53Shared units for demo projects......................................................................53SSL communication adapter units...................................................................53ConsumerTool................................................................................................54ProducerTool..................................................................................................56Performance Test...........................................................................................58Throughput Test Tool.....................................................................................60

    Broker Specific Demos........................................................................62Broker Statistics Example...............................................................................63Delay and Schedule Message Delivery............................................................65

    Message Options.................................................................................66JMS Standard Properties................................................................................66User Defined Properties..................................................................................67

    Temporary Queues..............................................................................69Introduction...................................................................................................69How should I implement request response with JMS?....................................69

    Logging with Log4D............................................................................70Introduction...................................................................................................70IDE configuration...........................................................................................70Minimal example............................................................................................70Log4D configuration file.................................................................................70Patches for new Delphi versions and Free Pascal...........................................72

    Conditional Symbols............................................................................74HABARI_LOGGING..........................................................................................74HABARI_RAW_TRACE.....................................................................................74

    Library Limitations..............................................................................75Session...........................................................................................................75MessageConsumer..........................................................................................75Message Properties........................................................................................75Multi Threading..............................................................................................76

  • 4 Habari Client for ActiveMQ 3.7

    ISAPI modules...................................