com.posco.reuse.kafka.activity
Class SFMessageSend

java.lang.Object
  extended by com.poscoict.glueframework.biz.activity.GlueActivity<GlueContext>
      extended by com.posco.reuse.kafka.activity.SFMessageSend

public class SFMessageSend
extends GlueActivity<GlueContext>

byte[] µ¥ÀÌŸ¸¦ Kafka¿¡ ¼Û½ÅÇÏ´Â ±â´ÉÀ» ¼öÇàÇÑ´Ù.

 Activity Property
 - sender-id : (Çʼö) applicationContext.xml¿¡ µî·ÏµÇ¾î ÀÖ´Â PosKafkaProducer bean id.
 - message-key : (Çʼö) GlueContext¿¡ µî·ÏµÇ¾î ÀÖ´Â byte[] °´Ã¼ÀÇ Key 
 - topic-key : (¼±ÅÃ) KafkaÀÇ topic °ªÀÌ µî·ÏµÇ¾î ÀÖ´Â GlueContext ÀÇ Key
 - topic : (¼±ÅÃ) KafkaÀÇ topic°ª
 
 ¿¹Á¦
 »ç¿ë ¿¹# 1
 - KafkaÀÇ GLUE_TEST04¶ó´Â topicÀ¸·Î µ¥ÀÌŸ¸¦ ¼Û½ÅÇÏ´Â °æ¿ì
 - applicationContext.xml¿¡ µî·ÏµÇ¾î ÀÖ´Â PosKafkaProducer bean id ´Â kafkaSenderÀÌ°í
   Kafka¿¡ Àü¼ÛÇÒ µ¥ÀÌÅÍ´Â sfmessage¸¦ Key·Î GlueContext¿¡ µî·ÏµÇ¾î ÀÖ´Â °æ¿ì
   
    <activity name="sendMessage" class="com.posco.reuse.kafka.activity.SFMessageSend">
      <transition name="success" value="end"/>
        <property name="sender-id" value="kafkaSender"/>
        <property name="topic" value="GLUE_TEST04"/>
        <property name="message-key" value="sfmessage"/>
    </activity>
 
 »ç¿ë ¿¹# 2
  - KafkaÀÇ topic °ªÀÌ GlueContext¿¡ topicÀ» Key·Î µî·ÏµÇ¾î ÀÖ´Â °æ¿ì
   
    <activity name="sendMessage" class="com.posco.reuse.kafka.activity.SFMessageSend">
      <transition name="success" value="end"/>
        <property name="sender-id" value="kafkaSender"/>
        <property name="topic-key" value="topic"/>
        <property name="message-key" value="sfmessage"/>
    </activity>
 
 Âü°í : applicationContext.xml
 
    <bean id="kafkaSender" class="com.posco.reuse.kafka.clients.PosKafkaProducer">
      <property name="propertisMap">
        <map>
          <entry key="bootstrap.servers" value="192.168.193.141:9092,192.168.193.142:9092" />
        </map>
      </property>
    </bean>
 


Field Summary
 
Fields inherited from class com.poscoict.glueframework.biz.activity.GlueActivity
dynamicProperties, logger
 
Constructor Summary
SFMessageSend()
           
 
Method Summary
 String runActivity(GlueContext ctx)
           
 
Methods inherited from class com.poscoict.glueframework.biz.activity.GlueActivity
commitTransaction, commitTransaction, getDao, getEventList, getName, getProperty, getPropertyNames, getTransition, rollbackTransaction, rollbackTransaction, setEventList, setName, setProperty, setTransition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SFMessageSend

public SFMessageSend()
Method Detail

runActivity

public String runActivity(GlueContext ctx)
Specified by:
runActivity in class GlueActivity<GlueContext>


Copyright © 2013–2016 POSCO ICT. All rights reserved.