SlideShare a Scribd company logo
1 of 14
Download to read offline
- JMS 시스템의 이해


Uajjang.com 미디어 검색팀 정경석
                2012. 05 .09
   What is JMS?
   Why JMS?
   Producer/Consumer
   Type of JMS model
   About ActiveMQ
   When is the right time to use ActiveMQ?
   How to use ActiveMQ?
   How to monitoring in ActiveMQ?
   Fault tolerance and High availability
   JMS is Java Message Service
   Standard J2EE messaging API
   JMS is asynchronous in nature
   Producer/Consumer pattern의 구현체
   Producer, Message, Consumer로 구성됨.
   Message broker system
     메시지 전송 중계를 담당.
     Message의 전송을 보장.
       즉, JMS를 통해 전송된 메시지는 반드시 목적지에 도달함.
 Heterogeneous application integration
   Unix <-> IBM Host, Java <-> C++
   이기종, 다른 언어로 작성된 Applicaion간의 업무 통
    합이 가능함.
 High reliability and the performance
 Do not need to concern about
 communication.
   데이터의 통신은 JMS가 담당 하므로 개발자는 순수
   하게 메시지에만 관심을 가질 수 있음
   메시지 전송의 투명성을 가짐.
Broker(JMS)



    Producer                   Consumer

 생산자는 메시지를 만들어서 Broker에게 전송.
 소비자는 Broker로 부터 메시지를 수신
 즉, 메시지가 생성되어 소비하기까지의 과정을 중계하는 역할
 Point to Point(Sender/Receiver)
     하나의 메시지는 하나의 목적지로만 전달됨.
     특정한 App이 메시지를 수신하도록 유도 가능.



        Sender              Queue    Receiver 1

                                     Receiver 2

 Publish and Subscribe
    하나의 메시지는 다중의 목적지로 전달됨.
    모든 App이 메시지를 수신



       Publisher             Topic   Subscriber

                                     Subscriber
 Most popular and powerful open source
 Message Broker
 Java based JMS implementation
 Spring Integration with ActiveMQ
 Fault tolerance(High availability)
 Easy to Scale out
 Supports a large number of Cross
 Language Clients(C#, C++, Perl, PHP, Python,
 Ruby, Delphi…)
 RPC의 대체(Async)
 Event Driven Architecture with POJOs
 (Shopping)
 Software적인 scalability를 보장받고자 하는 경
 우(SOA)
 메시지 전송의 보장이 필요한 경우(System간)
 Transaction load balancing 필요한 경우
 각 시스템에 동일한 메시지를 전달해야 하는 경
 우(Notification)
 Install ActiveMQ(using default setting).
 Write sender application(using ActiveMQ Lib)
 Write receiver application(using ActiveMQ Lib)




                    Broker(JMS)


     Producer                        Consumer
     (Sender)                        (Receiver)
Write sender application
ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory(“tcp://10.1.0.11:61616”);
Connection connection = connectionFactory.createConnection();
connection.start();

// Create the session
session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
destination = session.createQueue(“com.jjanglive.jPush”);

// Create the producer.
producer = session.createProducer(destination);
producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);

TextMessage textMessage = session.createTextMessage(“This is a sample message!!”);

producer.send(textMessage);
Write receiver application with Spring
public class SampleMessageHandler implements MessageListener {
@Override
public void onMessage(Message message) {
  // do something
  System.out.println(“Message Received!!!!!!!!”);
}
Spring setting
<bean id="connectionFactory"
class="org.apache.activemq.spring.ActiveMQConnectionFactory">
<property name="brokerURL" value="failover:tcp://10.4.0.101:61616" />
</bean>
<bean id="jPushQueue" class="org.apache.activemq.command.ActiveMQQueue">
<constructor-arg index="0" value="com.jjanglive.jPush" />
</bean>
<bean class="org.springframework.jms.listener.DefaultMessageListenerContainer">
<property name="connectionFactory" ref="connectionFactory" />
<property name="destination" ref="jPushQueue" />
<property name="messageListener" ref="jMessageListenerAdapter" />
</bean>
<bean id="jMessageListenerAdapter"
class="org.springframework.jms.listener.adapter.MessageListenerAdapter">
<constructor-arg>
<bean class="com.jjanglive.jpush.message.handler.JPushMessageHandler"></bean>
</constructor-arg>
</bean>
Connect to http://server_address:8161/admin
Broker down case


            MQ Client    MQ Client    …   MQ Client

                         Broker Agent          Failover connect



              Active       Active           Active
              MQ 1         MQ 2       …     MQ n



            Receiver 1   Receiver 2   …   Receiver n


 특정 Broker가 Down된 경우 MQ Client와 Receiver는 자동으로 down을 감
  지하고 살아 있는 Broker를 찾아 auto reconnect

More Related Content

What's hot

The RabbitMQ Message Broker
The RabbitMQ Message BrokerThe RabbitMQ Message Broker
The RabbitMQ Message BrokerMartin Toshev
 
Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOTVMware Tanzu
 
Spring Framework Petclinic sample application
Spring Framework Petclinic sample applicationSpring Framework Petclinic sample application
Spring Framework Petclinic sample applicationAntoine Rey
 
[GuideDoc] Deploy EKS thru eksctl - v1.22_v0.105.0.pdf
[GuideDoc] Deploy EKS thru eksctl - v1.22_v0.105.0.pdf[GuideDoc] Deploy EKS thru eksctl - v1.22_v0.105.0.pdf
[GuideDoc] Deploy EKS thru eksctl - v1.22_v0.105.0.pdfJo Hoon
 
Best Practices for Middleware and Integration Architecture Modernization with...
Best Practices for Middleware and Integration Architecture Modernization with...Best Practices for Middleware and Integration Architecture Modernization with...
Best Practices for Middleware and Integration Architecture Modernization with...Claus Ibsen
 
Messaging With ActiveMQ
Messaging With ActiveMQMessaging With ActiveMQ
Messaging With ActiveMQBruce Snyder
 
Introduction to Testcontainers
Introduction to TestcontainersIntroduction to Testcontainers
Introduction to TestcontainersVMware Tanzu
 
Node js Modules and Event Emitters
Node js Modules and Event EmittersNode js Modules and Event Emitters
Node js Modules and Event EmittersTheCreativedev Blog
 
Introduction to Actor Model and Akka
Introduction to Actor Model and AkkaIntroduction to Actor Model and Akka
Introduction to Actor Model and AkkaYung-Lin Ho
 
Event Driven Systems with Spring Boot, Spring Cloud Streams and Kafka
Event Driven Systems with Spring Boot, Spring Cloud Streams and KafkaEvent Driven Systems with Spring Boot, Spring Cloud Streams and Kafka
Event Driven Systems with Spring Boot, Spring Cloud Streams and KafkaVMware Tanzu
 
Workshop Spring - Session 1 - L'offre Spring et les bases
Workshop Spring  - Session 1 - L'offre Spring et les basesWorkshop Spring  - Session 1 - L'offre Spring et les bases
Workshop Spring - Session 1 - L'offre Spring et les basesAntoine Rey
 
Node.js File system & Streams
Node.js File system & StreamsNode.js File system & Streams
Node.js File system & StreamsEyal Vardi
 
Spring Framework - Data Access
Spring Framework - Data AccessSpring Framework - Data Access
Spring Framework - Data AccessDzmitry Naskou
 
Reactive programming
Reactive programmingReactive programming
Reactive programmingSUDIP GHOSH
 
Introduction à spring boot
Introduction à spring bootIntroduction à spring boot
Introduction à spring bootAntoine Rey
 

What's hot (20)

The RabbitMQ Message Broker
The RabbitMQ Message BrokerThe RabbitMQ Message Broker
The RabbitMQ Message Broker
 
Introduction to spring boot
Introduction to spring bootIntroduction to spring boot
Introduction to spring boot
 
Spring Native and Spring AOT
Spring Native and Spring AOTSpring Native and Spring AOT
Spring Native and Spring AOT
 
Spring Framework Petclinic sample application
Spring Framework Petclinic sample applicationSpring Framework Petclinic sample application
Spring Framework Petclinic sample application
 
[GuideDoc] Deploy EKS thru eksctl - v1.22_v0.105.0.pdf
[GuideDoc] Deploy EKS thru eksctl - v1.22_v0.105.0.pdf[GuideDoc] Deploy EKS thru eksctl - v1.22_v0.105.0.pdf
[GuideDoc] Deploy EKS thru eksctl - v1.22_v0.105.0.pdf
 
Best Practices for Middleware and Integration Architecture Modernization with...
Best Practices for Middleware and Integration Architecture Modernization with...Best Practices for Middleware and Integration Architecture Modernization with...
Best Practices for Middleware and Integration Architecture Modernization with...
 
Spring Security 5
Spring Security 5Spring Security 5
Spring Security 5
 
Messaging With ActiveMQ
Messaging With ActiveMQMessaging With ActiveMQ
Messaging With ActiveMQ
 
Introduction to Testcontainers
Introduction to TestcontainersIntroduction to Testcontainers
Introduction to Testcontainers
 
Node js Modules and Event Emitters
Node js Modules and Event EmittersNode js Modules and Event Emitters
Node js Modules and Event Emitters
 
Java Spring
Java SpringJava Spring
Java Spring
 
Introduction to Actor Model and Akka
Introduction to Actor Model and AkkaIntroduction to Actor Model and Akka
Introduction to Actor Model and Akka
 
Event Driven Systems with Spring Boot, Spring Cloud Streams and Kafka
Event Driven Systems with Spring Boot, Spring Cloud Streams and KafkaEvent Driven Systems with Spring Boot, Spring Cloud Streams and Kafka
Event Driven Systems with Spring Boot, Spring Cloud Streams and Kafka
 
Workshop Spring - Session 1 - L'offre Spring et les bases
Workshop Spring  - Session 1 - L'offre Spring et les basesWorkshop Spring  - Session 1 - L'offre Spring et les bases
Workshop Spring - Session 1 - L'offre Spring et les bases
 
Node.js File system & Streams
Node.js File system & StreamsNode.js File system & Streams
Node.js File system & Streams
 
Spring Framework - Data Access
Spring Framework - Data AccessSpring Framework - Data Access
Spring Framework - Data Access
 
kafka
kafkakafka
kafka
 
Reactive programming
Reactive programmingReactive programming
Reactive programming
 
Introduction à spring boot
Introduction à spring bootIntroduction à spring boot
Introduction à spring boot
 
Thinking in react
Thinking in reactThinking in react
Thinking in react
 

Viewers also liked

Messaging With Apache ActiveMQ
Messaging With Apache ActiveMQMessaging With Apache ActiveMQ
Messaging With Apache ActiveMQBruce Snyder
 
Enterprise Integration Patterns with ActiveMQ
Enterprise Integration Patterns with ActiveMQEnterprise Integration Patterns with ActiveMQ
Enterprise Integration Patterns with ActiveMQRob Davies
 
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
 
Apache ActiveMQ - Enterprise messaging in action
Apache ActiveMQ - Enterprise messaging in actionApache ActiveMQ - Enterprise messaging in action
Apache ActiveMQ - Enterprise messaging in actiondejanb
 
Apache ActiveMQ and Apache Camel
Apache ActiveMQ and Apache CamelApache ActiveMQ and Apache Camel
Apache ActiveMQ and Apache CamelOmi Om
 
Zero aos와 DIY HTS비교
Zero aos와 DIY HTS비교Zero aos와 DIY HTS비교
Zero aos와 DIY HTS비교Smith Kim
 
Active mq Installation and Master Slave setup
Active mq Installation and Master Slave setupActive mq Installation and Master Slave setup
Active mq Installation and Master Slave setupRamakrishna Narkedamilli
 
Mcollective orchestration tool 소개
Mcollective orchestration tool 소개Mcollective orchestration tool 소개
Mcollective orchestration tool 소개태준 문
 
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
 
모바일 개발 트랜드
모바일 개발 트랜드모바일 개발 트랜드
모바일 개발 트랜드Terry Cho
 
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
 
빌링:미터링 Bss platform구현
빌링:미터링 Bss platform구현빌링:미터링 Bss platform구현
빌링:미터링 Bss platform구현상욱 송
 
토종 개발자가 바라본 실리콘밸리 개발 트랜드
토종 개발자가 바라본 실리콘밸리 개발 트랜드토종 개발자가 바라본 실리콘밸리 개발 트랜드
토종 개발자가 바라본 실리콘밸리 개발 트랜드Justin Park
 
Introduction to ActiveMQ Apollo
Introduction to ActiveMQ ApolloIntroduction to ActiveMQ Apollo
Introduction to ActiveMQ Apollodejanb
 
클라우드 서비스운영 플랫폼 가루다 Open cloudengine_패스트캣_cto 송상욱
클라우드 서비스운영 플랫폼 가루다 Open cloudengine_패스트캣_cto 송상욱클라우드 서비스운영 플랫폼 가루다 Open cloudengine_패스트캣_cto 송상욱
클라우드 서비스운영 플랫폼 가루다 Open cloudengine_패스트캣_cto 송상욱uEngine Solutions
 
ActiveMQ 5.9.x new features
ActiveMQ 5.9.x new featuresActiveMQ 5.9.x new features
ActiveMQ 5.9.x new featuresChristian Posta
 
클라우드 서비스운영 플랫폼 가루다
클라우드 서비스운영 플랫폼 가루다클라우드 서비스운영 플랫폼 가루다
클라우드 서비스운영 플랫폼 가루다상욱 송
 
Dopplr: It's made of messages - Matt Biddulph
Dopplr: It's made of messages - Matt BiddulphDopplr: It's made of messages - Matt Biddulph
Dopplr: It's made of messages - Matt BiddulphCarsonified Team
 
Polyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQPolyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQChristian Posta
 

Viewers also liked (20)

Messaging With Apache ActiveMQ
Messaging With Apache ActiveMQMessaging With Apache ActiveMQ
Messaging With Apache ActiveMQ
 
Enterprise Integration Patterns with ActiveMQ
Enterprise Integration Patterns with ActiveMQEnterprise Integration Patterns with ActiveMQ
Enterprise Integration Patterns with 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
 
Apache ActiveMQ - Enterprise messaging in action
Apache ActiveMQ - Enterprise messaging in actionApache ActiveMQ - Enterprise messaging in action
Apache ActiveMQ - Enterprise messaging in action
 
Apache ActiveMQ and Apache Camel
Apache ActiveMQ and Apache CamelApache ActiveMQ and Apache Camel
Apache ActiveMQ and Apache Camel
 
Zero aos와 DIY HTS비교
Zero aos와 DIY HTS비교Zero aos와 DIY HTS비교
Zero aos와 DIY HTS비교
 
Active mq Installation and Master Slave setup
Active mq Installation and Master Slave setupActive mq Installation and Master Slave setup
Active mq Installation and Master Slave setup
 
Enterprise mobility
Enterprise mobilityEnterprise mobility
Enterprise mobility
 
Mcollective orchestration tool 소개
Mcollective orchestration tool 소개Mcollective orchestration tool 소개
Mcollective orchestration tool 소개
 
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
 
모바일 개발 트랜드
모바일 개발 트랜드모바일 개발 트랜드
모바일 개발 트랜드
 
IoT with Apache ActiveMQ, Camel & Spark
IoT with Apache ActiveMQ, Camel & SparkIoT with Apache ActiveMQ, Camel & Spark
IoT with Apache ActiveMQ, Camel & Spark
 
빌링:미터링 Bss platform구현
빌링:미터링 Bss platform구현빌링:미터링 Bss platform구현
빌링:미터링 Bss platform구현
 
토종 개발자가 바라본 실리콘밸리 개발 트랜드
토종 개발자가 바라본 실리콘밸리 개발 트랜드토종 개발자가 바라본 실리콘밸리 개발 트랜드
토종 개발자가 바라본 실리콘밸리 개발 트랜드
 
Introduction to ActiveMQ Apollo
Introduction to ActiveMQ ApolloIntroduction to ActiveMQ Apollo
Introduction to ActiveMQ Apollo
 
클라우드 서비스운영 플랫폼 가루다 Open cloudengine_패스트캣_cto 송상욱
클라우드 서비스운영 플랫폼 가루다 Open cloudengine_패스트캣_cto 송상욱클라우드 서비스운영 플랫폼 가루다 Open cloudengine_패스트캣_cto 송상욱
클라우드 서비스운영 플랫폼 가루다 Open cloudengine_패스트캣_cto 송상욱
 
ActiveMQ 5.9.x new features
ActiveMQ 5.9.x new featuresActiveMQ 5.9.x new features
ActiveMQ 5.9.x new features
 
클라우드 서비스운영 플랫폼 가루다
클라우드 서비스운영 플랫폼 가루다클라우드 서비스운영 플랫폼 가루다
클라우드 서비스운영 플랫폼 가루다
 
Dopplr: It's made of messages - Matt Biddulph
Dopplr: It's made of messages - Matt BiddulphDopplr: It's made of messages - Matt Biddulph
Dopplr: It's made of messages - Matt Biddulph
 
Polyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQPolyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQ
 

Similar to Active MQ

JavaEE6 Tutorial - Java Message Service_sys4u
JavaEE6 Tutorial - Java Message Service_sys4uJavaEE6 Tutorial - Java Message Service_sys4u
JavaEE6 Tutorial - Java Message Service_sys4usys4u
 
5-5. html5 connectivity
5-5. html5 connectivity5-5. html5 connectivity
5-5. html5 connectivityJinKyoungHeo
 
IBM Websphere MQ Software 소개 ( Messaging Engine )
IBM Websphere MQ Software  소개 ( Messaging Engine )IBM Websphere MQ Software  소개 ( Messaging Engine )
IBM Websphere MQ Software 소개 ( Messaging Engine )Shaun LEE
 
Androidpn guide-0.5.0-ko
Androidpn guide-0.5.0-koAndroidpn guide-0.5.0-ko
Androidpn guide-0.5.0-kosandeepreddyp42
 
[오픈소스컨설팅]JBoss AS7/EAP6 - JMS and JMX
[오픈소스컨설팅]JBoss AS7/EAP6 - JMS and JMX[오픈소스컨설팅]JBoss AS7/EAP6 - JMS and JMX
[오픈소스컨설팅]JBoss AS7/EAP6 - JMS and JMXJi-Woong Choi
 
Better Scalable Flexible Soa Platform 0.8.0
Better Scalable Flexible Soa Platform 0.8.0Better Scalable Flexible Soa Platform 0.8.0
Better Scalable Flexible Soa Platform 0.8.0Kidong Lee
 
Mirantis open stack deployment automation
Mirantis open stack deployment automationMirantis open stack deployment automation
Mirantis open stack deployment automationWooKyun Jeon
 
Progressive Web App(PWA) 테코톡 발표자료 - 마르코(장원석)
Progressive Web App(PWA) 테코톡 발표자료 - 마르코(장원석)Progressive Web App(PWA) 테코톡 발표자료 - 마르코(장원석)
Progressive Web App(PWA) 테코톡 발표자료 - 마르코(장원석)Wonseok Jang
 
Spring 4.x Web Application 살펴보기
Spring 4.x Web Application  살펴보기Spring 4.x Web Application  살펴보기
Spring 4.x Web Application 살펴보기Ji Heon Kim
 
IBM MQTT Mobile Push Solution 소개서
IBM MQTT Mobile Push Solution 소개서IBM MQTT Mobile Push Solution 소개서
IBM MQTT Mobile Push Solution 소개서Shaun LEE
 
[21]변화의 시대 : 안드로이드 앱 어떻게 개발할 것인가?
[21]변화의 시대 : 안드로이드 앱 어떻게 개발할 것인가?[21]변화의 시대 : 안드로이드 앱 어떻게 개발할 것인가?
[21]변화의 시대 : 안드로이드 앱 어떻게 개발할 것인가?NAVER Engineering
 
[개방형 클라우드 플랫폼 오픈세미나 오픈클라우드 Pub] 3.open shift 분석
[개방형 클라우드 플랫폼 오픈세미나 오픈클라우드 Pub] 3.open shift 분석[개방형 클라우드 플랫폼 오픈세미나 오픈클라우드 Pub] 3.open shift 분석
[개방형 클라우드 플랫폼 오픈세미나 오픈클라우드 Pub] 3.open shift 분석Tommy Lee
 
m-Station Channel Xpander5 020325
m-Station Channel Xpander5 020325m-Station Channel Xpander5 020325
m-Station Channel Xpander5 020325sbroh
 
Performance Testing using Loadrunner
Performance Testingusing LoadrunnerPerformance Testingusing Loadrunner
Performance Testing using Loadrunnerhmfive
 
.net core 에서 SignalR 사용해보기
.net core 에서 SignalR 사용해보기.net core 에서 SignalR 사용해보기
.net core 에서 SignalR 사용해보기Ji Lee
 
Zoo keeper 소개
Zoo keeper 소개Zoo keeper 소개
Zoo keeper 소개주표 홍
 
Cloud-Barista 제3차 오픈 컨퍼런스 : CB-Dragonfly - 멀티 클라우드 통합 모니터링 프레임워크(Multi-Cloud ...
Cloud-Barista 제3차 오픈 컨퍼런스 : CB-Dragonfly - 멀티 클라우드 통합 모니터링 프레임워크(Multi-Cloud ...Cloud-Barista 제3차 오픈 컨퍼런스 : CB-Dragonfly - 멀티 클라우드 통합 모니터링 프레임워크(Multi-Cloud ...
Cloud-Barista 제3차 오픈 컨퍼런스 : CB-Dragonfly - 멀티 클라우드 통합 모니터링 프레임워크(Multi-Cloud ...Cloud-Barista Community
 
이제 온라인이다! 브라우저 안으로 들어온 Visual studio!
이제 온라인이다! 브라우저 안으로 들어온 Visual studio!이제 온라인이다! 브라우저 안으로 들어온 Visual studio!
이제 온라인이다! 브라우저 안으로 들어온 Visual studio!SangHoon Han
 

Similar to Active MQ (20)

JavaEE6 Tutorial - Java Message Service_sys4u
JavaEE6 Tutorial - Java Message Service_sys4uJavaEE6 Tutorial - Java Message Service_sys4u
JavaEE6 Tutorial - Java Message Service_sys4u
 
5-5. html5 connectivity
5-5. html5 connectivity5-5. html5 connectivity
5-5. html5 connectivity
 
IBM Websphere MQ Software 소개 ( Messaging Engine )
IBM Websphere MQ Software  소개 ( Messaging Engine )IBM Websphere MQ Software  소개 ( Messaging Engine )
IBM Websphere MQ Software 소개 ( Messaging Engine )
 
Wisepush
WisepushWisepush
Wisepush
 
Androidpn guide-0.5.0-ko
Androidpn guide-0.5.0-koAndroidpn guide-0.5.0-ko
Androidpn guide-0.5.0-ko
 
[오픈소스컨설팅]JBoss AS7/EAP6 - JMS and JMX
[오픈소스컨설팅]JBoss AS7/EAP6 - JMS and JMX[오픈소스컨설팅]JBoss AS7/EAP6 - JMS and JMX
[오픈소스컨설팅]JBoss AS7/EAP6 - JMS and JMX
 
Better Scalable Flexible Soa Platform 0.8.0
Better Scalable Flexible Soa Platform 0.8.0Better Scalable Flexible Soa Platform 0.8.0
Better Scalable Flexible Soa Platform 0.8.0
 
Mirantis open stack deployment automation
Mirantis open stack deployment automationMirantis open stack deployment automation
Mirantis open stack deployment automation
 
Progressive Web App(PWA) 테코톡 발표자료 - 마르코(장원석)
Progressive Web App(PWA) 테코톡 발표자료 - 마르코(장원석)Progressive Web App(PWA) 테코톡 발표자료 - 마르코(장원석)
Progressive Web App(PWA) 테코톡 발표자료 - 마르코(장원석)
 
Spring 4.x Web Application 살펴보기
Spring 4.x Web Application  살펴보기Spring 4.x Web Application  살펴보기
Spring 4.x Web Application 살펴보기
 
IBM MQTT Mobile Push Solution 소개서
IBM MQTT Mobile Push Solution 소개서IBM MQTT Mobile Push Solution 소개서
IBM MQTT Mobile Push Solution 소개서
 
[21]변화의 시대 : 안드로이드 앱 어떻게 개발할 것인가?
[21]변화의 시대 : 안드로이드 앱 어떻게 개발할 것인가?[21]변화의 시대 : 안드로이드 앱 어떻게 개발할 것인가?
[21]변화의 시대 : 안드로이드 앱 어떻게 개발할 것인가?
 
[개방형 클라우드 플랫폼 오픈세미나 오픈클라우드 Pub] 3.open shift 분석
[개방형 클라우드 플랫폼 오픈세미나 오픈클라우드 Pub] 3.open shift 분석[개방형 클라우드 플랫폼 오픈세미나 오픈클라우드 Pub] 3.open shift 분석
[개방형 클라우드 플랫폼 오픈세미나 오픈클라우드 Pub] 3.open shift 분석
 
m-Station Channel Xpander5 020325
m-Station Channel Xpander5 020325m-Station Channel Xpander5 020325
m-Station Channel Xpander5 020325
 
Performance Testing using Loadrunner
Performance Testingusing LoadrunnerPerformance Testingusing Loadrunner
Performance Testing using Loadrunner
 
.net core 에서 SignalR 사용해보기
.net core 에서 SignalR 사용해보기.net core 에서 SignalR 사용해보기
.net core 에서 SignalR 사용해보기
 
Zoo keeper 소개
Zoo keeper 소개Zoo keeper 소개
Zoo keeper 소개
 
2015 oce specification
2015 oce specification2015 oce specification
2015 oce specification
 
Cloud-Barista 제3차 오픈 컨퍼런스 : CB-Dragonfly - 멀티 클라우드 통합 모니터링 프레임워크(Multi-Cloud ...
Cloud-Barista 제3차 오픈 컨퍼런스 : CB-Dragonfly - 멀티 클라우드 통합 모니터링 프레임워크(Multi-Cloud ...Cloud-Barista 제3차 오픈 컨퍼런스 : CB-Dragonfly - 멀티 클라우드 통합 모니터링 프레임워크(Multi-Cloud ...
Cloud-Barista 제3차 오픈 컨퍼런스 : CB-Dragonfly - 멀티 클라우드 통합 모니터링 프레임워크(Multi-Cloud ...
 
이제 온라인이다! 브라우저 안으로 들어온 Visual studio!
이제 온라인이다! 브라우저 안으로 들어온 Visual studio!이제 온라인이다! 브라우저 안으로 들어온 Visual studio!
이제 온라인이다! 브라우저 안으로 들어온 Visual studio!
 

More from Kris Jeong

Soscon2017 오픈소스를 활용한 마이크로 서비스의 캐시 전략
Soscon2017 오픈소스를 활용한 마이크로 서비스의 캐시 전략Soscon2017 오픈소스를 활용한 마이크로 서비스의 캐시 전략
Soscon2017 오픈소스를 활용한 마이크로 서비스의 캐시 전략Kris Jeong
 
Going asynchronous with netty - SOSCON 2015
Going asynchronous with netty - SOSCON 2015Going asynchronous with netty - SOSCON 2015
Going asynchronous with netty - SOSCON 2015Kris Jeong
 
Redis data design by usecase
Redis data design by usecaseRedis data design by usecase
Redis data design by usecaseKris Jeong
 
This is redis - feature and usecase
This is redis - feature and usecaseThis is redis - feature and usecase
This is redis - feature and usecaseKris Jeong
 
이것이 레디스다.
이것이 레디스다.이것이 레디스다.
이것이 레디스다.Kris Jeong
 
REDIS intro and how to use redis
REDIS intro and how to use redisREDIS intro and how to use redis
REDIS intro and how to use redisKris Jeong
 

More from Kris Jeong (6)

Soscon2017 오픈소스를 활용한 마이크로 서비스의 캐시 전략
Soscon2017 오픈소스를 활용한 마이크로 서비스의 캐시 전략Soscon2017 오픈소스를 활용한 마이크로 서비스의 캐시 전략
Soscon2017 오픈소스를 활용한 마이크로 서비스의 캐시 전략
 
Going asynchronous with netty - SOSCON 2015
Going asynchronous with netty - SOSCON 2015Going asynchronous with netty - SOSCON 2015
Going asynchronous with netty - SOSCON 2015
 
Redis data design by usecase
Redis data design by usecaseRedis data design by usecase
Redis data design by usecase
 
This is redis - feature and usecase
This is redis - feature and usecaseThis is redis - feature and usecase
This is redis - feature and usecase
 
이것이 레디스다.
이것이 레디스다.이것이 레디스다.
이것이 레디스다.
 
REDIS intro and how to use redis
REDIS intro and how to use redisREDIS intro and how to use redis
REDIS intro and how to use redis
 

Active MQ

  • 1. - JMS 시스템의 이해 Uajjang.com 미디어 검색팀 정경석 2012. 05 .09
  • 2. What is JMS?  Why JMS?  Producer/Consumer  Type of JMS model  About ActiveMQ  When is the right time to use ActiveMQ?  How to use ActiveMQ?  How to monitoring in ActiveMQ?  Fault tolerance and High availability
  • 3. JMS is Java Message Service  Standard J2EE messaging API  JMS is asynchronous in nature  Producer/Consumer pattern의 구현체  Producer, Message, Consumer로 구성됨.  Message broker system  메시지 전송 중계를 담당.  Message의 전송을 보장.  즉, JMS를 통해 전송된 메시지는 반드시 목적지에 도달함.
  • 4.  Heterogeneous application integration  Unix <-> IBM Host, Java <-> C++  이기종, 다른 언어로 작성된 Applicaion간의 업무 통 합이 가능함.  High reliability and the performance  Do not need to concern about communication.  데이터의 통신은 JMS가 담당 하므로 개발자는 순수 하게 메시지에만 관심을 가질 수 있음  메시지 전송의 투명성을 가짐.
  • 5. Broker(JMS) Producer Consumer  생산자는 메시지를 만들어서 Broker에게 전송.  소비자는 Broker로 부터 메시지를 수신  즉, 메시지가 생성되어 소비하기까지의 과정을 중계하는 역할
  • 6.  Point to Point(Sender/Receiver)  하나의 메시지는 하나의 목적지로만 전달됨.  특정한 App이 메시지를 수신하도록 유도 가능. Sender Queue Receiver 1 Receiver 2  Publish and Subscribe  하나의 메시지는 다중의 목적지로 전달됨.  모든 App이 메시지를 수신 Publisher Topic Subscriber Subscriber
  • 7.  Most popular and powerful open source Message Broker  Java based JMS implementation  Spring Integration with ActiveMQ  Fault tolerance(High availability)  Easy to Scale out  Supports a large number of Cross Language Clients(C#, C++, Perl, PHP, Python, Ruby, Delphi…)
  • 8.  RPC의 대체(Async)  Event Driven Architecture with POJOs (Shopping)  Software적인 scalability를 보장받고자 하는 경 우(SOA)  메시지 전송의 보장이 필요한 경우(System간)  Transaction load balancing 필요한 경우  각 시스템에 동일한 메시지를 전달해야 하는 경 우(Notification)
  • 9.  Install ActiveMQ(using default setting).  Write sender application(using ActiveMQ Lib)  Write receiver application(using ActiveMQ Lib) Broker(JMS) Producer Consumer (Sender) (Receiver)
  • 10. Write sender application ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(“tcp://10.1.0.11:61616”); Connection connection = connectionFactory.createConnection(); connection.start(); // Create the session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE); destination = session.createQueue(“com.jjanglive.jPush”); // Create the producer. producer = session.createProducer(destination); producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT); TextMessage textMessage = session.createTextMessage(“This is a sample message!!”); producer.send(textMessage);
  • 11. Write receiver application with Spring public class SampleMessageHandler implements MessageListener { @Override public void onMessage(Message message) { // do something System.out.println(“Message Received!!!!!!!!”); }
  • 12. Spring setting <bean id="connectionFactory" class="org.apache.activemq.spring.ActiveMQConnectionFactory"> <property name="brokerURL" value="failover:tcp://10.4.0.101:61616" /> </bean> <bean id="jPushQueue" class="org.apache.activemq.command.ActiveMQQueue"> <constructor-arg index="0" value="com.jjanglive.jPush" /> </bean> <bean class="org.springframework.jms.listener.DefaultMessageListenerContainer"> <property name="connectionFactory" ref="connectionFactory" /> <property name="destination" ref="jPushQueue" /> <property name="messageListener" ref="jMessageListenerAdapter" /> </bean> <bean id="jMessageListenerAdapter" class="org.springframework.jms.listener.adapter.MessageListenerAdapter"> <constructor-arg> <bean class="com.jjanglive.jpush.message.handler.JPushMessageHandler"></bean> </constructor-arg> </bean>
  • 14. Broker down case MQ Client MQ Client … MQ Client Broker Agent Failover connect Active Active Active MQ 1 MQ 2 … MQ n Receiver 1 Receiver 2 … Receiver n  특정 Broker가 Down된 경우 MQ Client와 Receiver는 자동으로 down을 감 지하고 살아 있는 Broker를 찾아 auto reconnect