SlideShare une entreprise Scribd logo
1  sur  16
By Ramakrishna Narkedamilli
Overview:
Apache ActiveMQ is the most popular and powerful open source messaging and
Integration Patterns server.
Apache ActiveMQ is fast, supports many Cross Language Clients. Using this we can
enable to message throttling, redelivery, delay of messages.
In this Presentation will going to see
 ActiveMQ Installation and configurations
 DeadLetter queue configuration
 Configuring ActiveMQ in clusters
 Running ActiveMQ in clusters
ActiveMQ Installation and configurations:
Prerequisites
 ActiveMQ installer -- apache-activemq-5.8.0-bin.zip
 Database:- Microsoft SQL Server
Limitations:
The configuration is done in activemq.xml and the configuration tags used in the
code works with apache-activemq version 5.8.0.It might change according to latest
versions.
Steps to Install
 Extract apache-activemq-5.8.0-bin.zip to a folder eg:- Applications where it will be
running
 It will create the folder apache-activemq-5.8.0 in the Applications folder
 Go to the folder <apache-activemq-5.8.0bins> and start the activemq.bat file
 The ActiveMq server will be started and will be running.
 Enter the address in the browser :- http://localhost:8161/admin
 Enter the user name and password as admin , admin
DeadLetter queue configuration:
To configure DeadLetter Queue in activeMQ:-
 Go to the folder <apache-activemq-5.8.0conf>
 Open the file activemq.xml in an editor.
 Modify the following in the file :-
 Set the following code in the redeliveryPolicyMap:-
<redeliveryPolicyEntries>
<redeliveryPolicy queue=">" maximumRedeliveries="1"
redeliveryDelay="1200000" initialRedeliveryDelay="5000"
useCollisionAvoidance="true" />
</redeliveryPolicyEntries>
 Enter the following tags:-
<broker xmlns="http://activemq.apache.org/schema/core"
brokerName="localhost " dataDirectory="${activemq.data}" persistent="true">
 Here maximumRedeliveries is the number of redeliveries of the messages,
redeliveryDelay is the interval of messages to be delivered and
initialRedeliveryDelay is the interval which the messages will be triggered for the
first time.
 Here brokerName needs to be mentioned.
 The above script will set the redeliveryPolicies.
 Note:-The queue will not be created until messages are pushed in ActiveMQ.
 Open Mule and run the consumer program to consume the messages from
ActiveMQ.
 Once the data is pushed from SAP the ActiveMQ will create the queue and stores
the messages.
 Now whenever the consumer throws an exception, The messages will retry to a
certain time based on redelivery policy of ActiveMQ and a deadletter queue will
be created and failed messages will be pushed to the deadletter queue.
Configuring ActiveMQ in clusters:
Clustering is needed so that if 1 node(master) goes down then the other
nodes(slaves) can take the work from it and the data should always be available.
Steps to Install and configure ActiveMQ in clusters:-
 Let there be 2 nodes which we want to configure in cluster.
 Repeat the installing and configuring of ActiveMQ on both systems which would
be in clusters.
 Need to install Microsoft SQL Server on one of the systems that are in clusters.
 Now open the activemq.xml file of ActiveMQ from <apache-activemq-5.8.0conf>
folder.
 Change the broker name.Note:- The broker name should be different for both the
nodes:-
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="Node1 "
dataDirectory="${activemq.data}" persistent="true">
 Enter the following tag below to bean class tag in the file:-
 Add the following tags inside persistenceAdapter tag:-
<bean id="sql-ds"
class="org.apache.commons.dbcp.BasicDataSource" destroy-
method="close">
<property
name="driverClassName"
value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<property name="url"
value="jdbc:sqlserver://=%ipaddress%SQLEXPRESS:1433;databaseNa
me=SOA_VMES"/>
<property name="username"
value="username"/>
<property name="password"
value="samplepassword"/>
<property name="maxActive"
value="200"/>
<property
name="poolPreparedStatements" value="true"/>
</bean>
<jdbcPersistenceAdapter dataDirectory="${activemq.base}/activemq-data"
dataSource="#sql-ds" useDatabaseLock="true" lockKeepAlivePeriod="5000"/>
 Remove the kahaDB tag from persistenceAdapter tag.
 Copy the sqljdbc4.jar file in activemq lib folder if it is not there.
 Give different web app port numbers in different nodes.(For ex :node1->8161 &
node->8162)
 Change port number in transportConnector tag in activemq.xml file in node2.
 (for ex node1 give 61616 & for node2 give 62626).
 Note: - useDatabaseLock="true" should always be true
 Here driverClassName is the name of the database driver.
 url is the url of the SQL server with the database name.
 username and password are the username and password for the database
 dataSource is the the name of the data source we are configuring in the database
configuration.
 Now go to the next clustered node and open the activemq.xml file of ActiveMQ
from <apache-activemq-5.8.0conf> folder
 Repeat the same configuration and both the ActiveMQ are in clustered
 Note here in this node the broker name need to be changed
 Rest everything in the configuration file of the second node will be same as it is.
 Note there should be a database named SOA_VMES in the SQL server which the
ActiveMQ will use for clustering.
 The database should be one which will be using by both the clusters. The database
should be installed in any one of the node.
<broker xmlns="http://activemq.apache.org/schema/core"
brokerName="Node2 " dataDirectory="${activemq.data}"
persistent="true">
Running ActiveMQ in clusters:
 Go to node1 which is the first node in the cluster. This node will act as master.
 Go to the folder <apache-activemq-5.8.0bins> and start the activemq.bat file
 The ActiveMQ node1 server will be started and will act as a Master node
 Enter the address in the browser :- http://localhost:8161/admin
 Enter the user name and password as admin , admin
 Click the Queue in the portal to view the queue messages in the ActiveMQ
 Currently there will be no messages and following screen will appear
 Goto node2 and repeat the same process to start activeMQ server
 Now both the nodes are running in clusters.
 Node2 will start but since Node2 is a slave it will not be activated and wait for the
control of the database due to database lock. Check the screenshots below:-
Node2 ActiveMQ server is waiting for the database lock to be release. If we open
the browser in node2 and enter http://localhost:8162/admin, it will not display
anything since it is not activated.
 For Testing purpose, push the messages to Master (Node1) server using some Java
code or Mule ESB flows.
 Stop the master instance.
 Slave instance will pick the lock from database immediately and gets the messages
from Node1
 Open the browser http://localhost:8162/admin.
 You can able to see messages that has been received from Master node.
THANKS YOU
By Ramakrishna Narkedamilli

Contenu connexe

Tendances

Performance testing with Apache JMeter
Performance testing with Apache JMeterPerformance testing with Apache JMeter
Performance testing with Apache JMeterRedBlackTree
 
Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance TestingAtul Pant
 
Jmeter Tester Certification
Jmeter Tester CertificationJmeter Tester Certification
Jmeter Tester CertificationVskills
 
Performance testing with jmeter
Performance testing with jmeter Performance testing with jmeter
Performance testing with jmeter Knoldus Inc.
 
Performance testing with JMeter
Performance testing with JMeterPerformance testing with JMeter
Performance testing with JMeterMikael Kundert
 
Cours javascript
Cours javascriptCours javascript
Cours javascriptkrymo
 
Performance Testing REST APIs
Performance Testing REST APIsPerformance Testing REST APIs
Performance Testing REST APIsJason Weden
 
Performance testing using jmeter
Performance testing using jmeterPerformance testing using jmeter
Performance testing using jmeterRachappa Bandi
 
TestNG Session presented in PB
TestNG Session presented in PBTestNG Session presented in PB
TestNG Session presented in PBAbhishek Yadav
 
How to Analyze Reports in Jmeter
How to Analyze Reports in JmeterHow to Analyze Reports in Jmeter
How to Analyze Reports in JmeterViviana Lesmes
 
Performance testing and reporting with JMeter
Performance testing and reporting with JMeterPerformance testing and reporting with JMeter
Performance testing and reporting with JMeterjvSlideshare
 
Interpreting Performance Test Results
Interpreting Performance Test ResultsInterpreting Performance Test Results
Interpreting Performance Test ResultsEric Proegler
 

Tendances (20)

Performance testing with Apache JMeter
Performance testing with Apache JMeterPerformance testing with Apache JMeter
Performance testing with Apache JMeter
 
Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance Testing
 
Jmeter Tester Certification
Jmeter Tester CertificationJmeter Tester Certification
Jmeter Tester Certification
 
Performance testing with jmeter
Performance testing with jmeter Performance testing with jmeter
Performance testing with jmeter
 
Performance testing with JMeter
Performance testing with JMeterPerformance testing with JMeter
Performance testing with JMeter
 
J Meter Intro
J Meter IntroJ Meter Intro
J Meter Intro
 
Cours javascript
Cours javascriptCours javascript
Cours javascript
 
Load testing with J meter
Load testing with J meterLoad testing with J meter
Load testing with J meter
 
Jenkins
JenkinsJenkins
Jenkins
 
Performance Testing REST APIs
Performance Testing REST APIsPerformance Testing REST APIs
Performance Testing REST APIs
 
JMeter
JMeterJMeter
JMeter
 
Performance testing using jmeter
Performance testing using jmeterPerformance testing using jmeter
Performance testing using jmeter
 
Formation jmeter
Formation jmeterFormation jmeter
Formation jmeter
 
Jmeter apresentacao
Jmeter apresentacaoJmeter apresentacao
Jmeter apresentacao
 
TestNG Session presented in PB
TestNG Session presented in PBTestNG Session presented in PB
TestNG Session presented in PB
 
How to Analyze Reports in Jmeter
How to Analyze Reports in JmeterHow to Analyze Reports in Jmeter
How to Analyze Reports in Jmeter
 
Performance testing and reporting with JMeter
Performance testing and reporting with JMeterPerformance testing and reporting with JMeter
Performance testing and reporting with JMeter
 
TestNG
TestNGTestNG
TestNG
 
Interpreting Performance Test Results
Interpreting Performance Test ResultsInterpreting Performance Test Results
Interpreting Performance Test Results
 
JMeter workshop
JMeter workshopJMeter workshop
JMeter workshop
 

En vedette

Advanced messaging with Apache ActiveMQ
Advanced messaging with Apache ActiveMQAdvanced messaging with Apache ActiveMQ
Advanced messaging with Apache ActiveMQdejanb
 
Messaging for Web and Mobile with Apache ActiveMQ
Messaging for Web and Mobile with Apache ActiveMQMessaging for Web and Mobile with Apache ActiveMQ
Messaging for Web and Mobile with Apache ActiveMQdejanb
 
ActiveMQ In Action
ActiveMQ In ActionActiveMQ In Action
ActiveMQ In ActionBruce Snyder
 
ActiveMQ 5.9.x new features
ActiveMQ 5.9.x new featuresActiveMQ 5.9.x new features
ActiveMQ 5.9.x new featuresChristian Posta
 
Messaging With ActiveMQ
Messaging With ActiveMQMessaging With ActiveMQ
Messaging With ActiveMQBruce Snyder
 
IoT with Apache ActiveMQ, Camel & Spark
IoT with Apache ActiveMQ, Camel & SparkIoT with Apache ActiveMQ, Camel & Spark
IoT with Apache ActiveMQ, Camel & SparkRed Hat Developers
 
Enterprise Integration Patterns with ActiveMQ
Enterprise Integration Patterns with ActiveMQEnterprise Integration Patterns with ActiveMQ
Enterprise Integration Patterns with ActiveMQRob Davies
 
A Practical Guide for Selecting an Enterprise Messaging Platforms
A Practical Guide for Selecting an Enterprise Messaging PlatformsA Practical Guide for Selecting an Enterprise Messaging Platforms
A Practical Guide for Selecting an Enterprise Messaging PlatformsJesus Rodriguez
 
Messaging With Apache ActiveMQ
Messaging With Apache ActiveMQMessaging With Apache ActiveMQ
Messaging With Apache ActiveMQBruce Snyder
 
Connecting Applications Everywhere with ActiveMQ
Connecting Applications Everywhere with ActiveMQConnecting Applications Everywhere with ActiveMQ
Connecting Applications Everywhere with ActiveMQRob Davies
 
Websphere MQ (MQSeries) fundamentals
Websphere MQ (MQSeries) fundamentalsWebsphere MQ (MQSeries) fundamentals
Websphere MQ (MQSeries) fundamentalsBiju Nair
 
Queue Management
Queue ManagementQueue Management
Queue ManagementOmid Rad
 
JMS Providers Overview
JMS Providers OverviewJMS Providers Overview
JMS Providers OverviewVadym Lotar
 

En vedette (15)

Advanced messaging with Apache ActiveMQ
Advanced messaging with Apache ActiveMQAdvanced messaging with Apache ActiveMQ
Advanced messaging with Apache ActiveMQ
 
Messaging for Web and Mobile with Apache ActiveMQ
Messaging for Web and Mobile with Apache ActiveMQMessaging for Web and Mobile with Apache ActiveMQ
Messaging for Web and Mobile with Apache ActiveMQ
 
ActiveMQ In Action
ActiveMQ In ActionActiveMQ In Action
ActiveMQ In Action
 
ActiveMQ 5.9.x new features
ActiveMQ 5.9.x new featuresActiveMQ 5.9.x new features
ActiveMQ 5.9.x new features
 
Messaging With ActiveMQ
Messaging With ActiveMQMessaging With ActiveMQ
Messaging With ActiveMQ
 
IoT with Apache ActiveMQ, Camel & Spark
IoT with Apache ActiveMQ, Camel & SparkIoT with Apache ActiveMQ, Camel & Spark
IoT with Apache ActiveMQ, Camel & Spark
 
Enterprise mobility
Enterprise mobilityEnterprise mobility
Enterprise mobility
 
Enterprise Integration Patterns with ActiveMQ
Enterprise Integration Patterns with ActiveMQEnterprise Integration Patterns with ActiveMQ
Enterprise Integration Patterns with ActiveMQ
 
A Practical Guide for Selecting an Enterprise Messaging Platforms
A Practical Guide for Selecting an Enterprise Messaging PlatformsA Practical Guide for Selecting an Enterprise Messaging Platforms
A Practical Guide for Selecting an Enterprise Messaging Platforms
 
Active MQ
Active MQActive MQ
Active MQ
 
Messaging With Apache ActiveMQ
Messaging With Apache ActiveMQMessaging With Apache ActiveMQ
Messaging With Apache ActiveMQ
 
Connecting Applications Everywhere with ActiveMQ
Connecting Applications Everywhere with ActiveMQConnecting Applications Everywhere with ActiveMQ
Connecting Applications Everywhere with ActiveMQ
 
Websphere MQ (MQSeries) fundamentals
Websphere MQ (MQSeries) fundamentalsWebsphere MQ (MQSeries) fundamentals
Websphere MQ (MQSeries) fundamentals
 
Queue Management
Queue ManagementQueue Management
Queue Management
 
JMS Providers Overview
JMS Providers OverviewJMS Providers Overview
JMS Providers Overview
 

Similaire à Active mq Installation and Master Slave setup

Activemq installation and master slave setup using shared broker data
Activemq installation and master slave setup using shared broker dataActivemq installation and master slave setup using shared broker data
Activemq installation and master slave setup using shared broker dataRamakrishna Narkedamilli
 
Ch10.애플리케이션 서버의 병목_발견_방법
Ch10.애플리케이션 서버의 병목_발견_방법Ch10.애플리케이션 서버의 병목_발견_방법
Ch10.애플리케이션 서버의 병목_발견_방법Minchul Jung
 
Salt Cloud vmware-orchestration
Salt Cloud vmware-orchestrationSalt Cloud vmware-orchestration
Salt Cloud vmware-orchestrationMo Rawi
 
Mater,slave on mysql
Mater,slave on mysqlMater,slave on mysql
Mater,slave on mysqlVasudeva Rao
 
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best PracticesMySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best PracticesKenny Gryp
 
ActiveMQ Configuration
ActiveMQ ConfigurationActiveMQ Configuration
ActiveMQ ConfigurationAshish Mishra
 
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...Timofey Turenko
 
Monitoring Agile PLM with JConsole
Monitoring Agile PLM with JConsole Monitoring Agile PLM with JConsole
Monitoring Agile PLM with JConsole PLM Mechanic .
 
Bpug mcollective 20140624
Bpug mcollective 20140624Bpug mcollective 20140624
Bpug mcollective 20140624Johan De Wit
 
Saltcheck: a tool in the salt toolbox
Saltcheck: a tool in the salt toolboxSaltcheck: a tool in the salt toolbox
Saltcheck: a tool in the salt toolboxChristian McHugh
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Carlos Sanchez
 
Codemotion Rome 2018 Docker Swarm Mode
Codemotion Rome 2018 Docker Swarm ModeCodemotion Rome 2018 Docker Swarm Mode
Codemotion Rome 2018 Docker Swarm ModeSimone Soldateschi
 
Architecting cloud
Architecting cloudArchitecting cloud
Architecting cloudTahsin Hasan
 
Drupal, varnish, esi - Toulouse November 2
Drupal, varnish, esi - Toulouse November 2Drupal, varnish, esi - Toulouse November 2
Drupal, varnish, esi - Toulouse November 2Marcus Deglos
 

Similaire à Active mq Installation and Master Slave setup (20)

Activemq installation and master slave setup using shared broker data
Activemq installation and master slave setup using shared broker dataActivemq installation and master slave setup using shared broker data
Activemq installation and master slave setup using shared broker data
 
Mysql ppt
Mysql pptMysql ppt
Mysql ppt
 
Ch10.애플리케이션 서버의 병목_발견_방법
Ch10.애플리케이션 서버의 병목_발견_방법Ch10.애플리케이션 서버의 병목_발견_방법
Ch10.애플리케이션 서버의 병목_발견_방법
 
Tomcat 6: Evolving our server
Tomcat 6: Evolving our serverTomcat 6: Evolving our server
Tomcat 6: Evolving our server
 
Salt Cloud vmware-orchestration
Salt Cloud vmware-orchestrationSalt Cloud vmware-orchestration
Salt Cloud vmware-orchestration
 
Mater,slave on mysql
Mater,slave on mysqlMater,slave on mysql
Mater,slave on mysql
 
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best PracticesMySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
MySQL InnoDB Cluster - New Features in 8.0 Releases - Best Practices
 
ActiveMQ Configuration
ActiveMQ ConfigurationActiveMQ Configuration
ActiveMQ Configuration
 
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
 
java
javajava
java
 
Monitoring Agile PLM with JConsole
Monitoring Agile PLM with JConsole Monitoring Agile PLM with JConsole
Monitoring Agile PLM with JConsole
 
Bpug mcollective 20140624
Bpug mcollective 20140624Bpug mcollective 20140624
Bpug mcollective 20140624
 
Jsp and jstl
Jsp and jstlJsp and jstl
Jsp and jstl
 
Saltcheck: a tool in the salt toolbox
Saltcheck: a tool in the salt toolboxSaltcheck: a tool in the salt toolbox
Saltcheck: a tool in the salt toolbox
 
Tomcat tutorail
Tomcat tutorailTomcat tutorail
Tomcat tutorail
 
Lampstack (1)
Lampstack (1)Lampstack (1)
Lampstack (1)
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
 
Codemotion Rome 2018 Docker Swarm Mode
Codemotion Rome 2018 Docker Swarm ModeCodemotion Rome 2018 Docker Swarm Mode
Codemotion Rome 2018 Docker Swarm Mode
 
Architecting cloud
Architecting cloudArchitecting cloud
Architecting cloud
 
Drupal, varnish, esi - Toulouse November 2
Drupal, varnish, esi - Toulouse November 2Drupal, varnish, esi - Toulouse November 2
Drupal, varnish, esi - Toulouse November 2
 

Plus de Ramakrishna Narkedamilli

Plus de Ramakrishna Narkedamilli (9)

Enabling Security For ActiveMQ JMX Access
Enabling Security For ActiveMQ JMX AccessEnabling Security For ActiveMQ JMX Access
Enabling Security For ActiveMQ JMX Access
 
Mule Requester Usage Demo
Mule Requester Usage DemoMule Requester Usage Demo
Mule Requester Usage Demo
 
Mule Integration with Dropbox
Mule Integration with DropboxMule Integration with Dropbox
Mule Integration with Dropbox
 
Mule ESB integration with Stripe
Mule ESB integration with StripeMule ESB integration with Stripe
Mule ESB integration with Stripe
 
Mule integration with Servicenow
Mule integration with ServicenowMule integration with Servicenow
Mule integration with Servicenow
 
Custom connector development using mule DevKit
Custom connector development using mule DevKitCustom connector development using mule DevKit
Custom connector development using mule DevKit
 
Mule Integration with Atlassian JIRA
Mule Integration with Atlassian JIRAMule Integration with Atlassian JIRA
Mule Integration with Atlassian JIRA
 
MMC control for failing flows consistently
MMC control for failing flows consistentlyMMC control for failing flows consistently
MMC control for failing flows consistently
 
Salesforce Integration Using javacode
Salesforce Integration Using javacodeSalesforce Integration Using javacode
Salesforce Integration Using javacode
 

Dernier

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 

Dernier (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Active mq Installation and Master Slave setup

  • 2. Overview: Apache ActiveMQ is the most popular and powerful open source messaging and Integration Patterns server. Apache ActiveMQ is fast, supports many Cross Language Clients. Using this we can enable to message throttling, redelivery, delay of messages. In this Presentation will going to see  ActiveMQ Installation and configurations  DeadLetter queue configuration  Configuring ActiveMQ in clusters  Running ActiveMQ in clusters
  • 3. ActiveMQ Installation and configurations: Prerequisites  ActiveMQ installer -- apache-activemq-5.8.0-bin.zip  Database:- Microsoft SQL Server Limitations: The configuration is done in activemq.xml and the configuration tags used in the code works with apache-activemq version 5.8.0.It might change according to latest versions.
  • 4. Steps to Install  Extract apache-activemq-5.8.0-bin.zip to a folder eg:- Applications where it will be running  It will create the folder apache-activemq-5.8.0 in the Applications folder  Go to the folder <apache-activemq-5.8.0bins> and start the activemq.bat file  The ActiveMq server will be started and will be running.  Enter the address in the browser :- http://localhost:8161/admin  Enter the user name and password as admin , admin
  • 5. DeadLetter queue configuration: To configure DeadLetter Queue in activeMQ:-  Go to the folder <apache-activemq-5.8.0conf>  Open the file activemq.xml in an editor.  Modify the following in the file :-  Set the following code in the redeliveryPolicyMap:- <redeliveryPolicyEntries> <redeliveryPolicy queue=">" maximumRedeliveries="1" redeliveryDelay="1200000" initialRedeliveryDelay="5000" useCollisionAvoidance="true" /> </redeliveryPolicyEntries>  Enter the following tags:- <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost " dataDirectory="${activemq.data}" persistent="true">
  • 6.  Here maximumRedeliveries is the number of redeliveries of the messages, redeliveryDelay is the interval of messages to be delivered and initialRedeliveryDelay is the interval which the messages will be triggered for the first time.  Here brokerName needs to be mentioned.  The above script will set the redeliveryPolicies.  Note:-The queue will not be created until messages are pushed in ActiveMQ.  Open Mule and run the consumer program to consume the messages from ActiveMQ.  Once the data is pushed from SAP the ActiveMQ will create the queue and stores the messages.
  • 7.  Now whenever the consumer throws an exception, The messages will retry to a certain time based on redelivery policy of ActiveMQ and a deadletter queue will be created and failed messages will be pushed to the deadletter queue.
  • 8. Configuring ActiveMQ in clusters: Clustering is needed so that if 1 node(master) goes down then the other nodes(slaves) can take the work from it and the data should always be available. Steps to Install and configure ActiveMQ in clusters:-  Let there be 2 nodes which we want to configure in cluster.  Repeat the installing and configuring of ActiveMQ on both systems which would be in clusters.  Need to install Microsoft SQL Server on one of the systems that are in clusters.  Now open the activemq.xml file of ActiveMQ from <apache-activemq-5.8.0conf> folder.  Change the broker name.Note:- The broker name should be different for both the nodes:- <broker xmlns="http://activemq.apache.org/schema/core" brokerName="Node1 " dataDirectory="${activemq.data}" persistent="true">
  • 9.  Enter the following tag below to bean class tag in the file:-  Add the following tags inside persistenceAdapter tag:- <bean id="sql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy- method="close"> <property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/> <property name="url" value="jdbc:sqlserver://=%ipaddress%SQLEXPRESS:1433;databaseNa me=SOA_VMES"/> <property name="username" value="username"/> <property name="password" value="samplepassword"/> <property name="maxActive" value="200"/> <property name="poolPreparedStatements" value="true"/> </bean> <jdbcPersistenceAdapter dataDirectory="${activemq.base}/activemq-data" dataSource="#sql-ds" useDatabaseLock="true" lockKeepAlivePeriod="5000"/>
  • 10.  Remove the kahaDB tag from persistenceAdapter tag.  Copy the sqljdbc4.jar file in activemq lib folder if it is not there.  Give different web app port numbers in different nodes.(For ex :node1->8161 & node->8162)  Change port number in transportConnector tag in activemq.xml file in node2.  (for ex node1 give 61616 & for node2 give 62626).  Note: - useDatabaseLock="true" should always be true  Here driverClassName is the name of the database driver.  url is the url of the SQL server with the database name.  username and password are the username and password for the database  dataSource is the the name of the data source we are configuring in the database configuration.  Now go to the next clustered node and open the activemq.xml file of ActiveMQ from <apache-activemq-5.8.0conf> folder  Repeat the same configuration and both the ActiveMQ are in clustered
  • 11.  Note here in this node the broker name need to be changed  Rest everything in the configuration file of the second node will be same as it is.  Note there should be a database named SOA_VMES in the SQL server which the ActiveMQ will use for clustering.  The database should be one which will be using by both the clusters. The database should be installed in any one of the node. <broker xmlns="http://activemq.apache.org/schema/core" brokerName="Node2 " dataDirectory="${activemq.data}" persistent="true">
  • 12. Running ActiveMQ in clusters:  Go to node1 which is the first node in the cluster. This node will act as master.  Go to the folder <apache-activemq-5.8.0bins> and start the activemq.bat file  The ActiveMQ node1 server will be started and will act as a Master node
  • 13.  Enter the address in the browser :- http://localhost:8161/admin  Enter the user name and password as admin , admin  Click the Queue in the portal to view the queue messages in the ActiveMQ  Currently there will be no messages and following screen will appear
  • 14.  Goto node2 and repeat the same process to start activeMQ server  Now both the nodes are running in clusters.  Node2 will start but since Node2 is a slave it will not be activated and wait for the control of the database due to database lock. Check the screenshots below:- Node2 ActiveMQ server is waiting for the database lock to be release. If we open the browser in node2 and enter http://localhost:8162/admin, it will not display anything since it is not activated.
  • 15.  For Testing purpose, push the messages to Master (Node1) server using some Java code or Mule ESB flows.  Stop the master instance.  Slave instance will pick the lock from database immediately and gets the messages from Node1  Open the browser http://localhost:8162/admin.  You can able to see messages that has been received from Master node.