implementing a simple listener for BlueDragon (CFML) message-plugin

47 views Asked by At

I'm trying to make a hello world example for a CFML message-plugin made available by BlueDragon:

http://openbd.org/manual/?/plugin_message

I couldn't get my listener to work on the part it says: Receiving message from a topic is done using a CFC with the onMessage( message, header ) method defined.

When I inspected my logs (plugin-message.log) on the server:

22/05/14 18:39.45: send( vm://localhost@GOOG, size=9 )
22/05/14 18:39.45: [email protected]; Topic=GOOG; E=Error at line 1, column 1

it appears that something is wrong with my listener.cfc file:

<cfcomponent>

<cffunction name="onMessage" access="remote" >

<cfargument name="message" type="string" required="true"/>
<cfargument name="header" type="string" required="true"/>



<cfstoredproc procedure="insert_message" datasource="AJDB">


<cfprocparam
    cfsqltype="cf_sql_varchar"
    value="jms">

<cfprocparam
    cfsqltype="cf_sql_varchar"
    value="alanserver">

<cfprocparam
    cfsqltype="cf_sql_varchar"
    value="#message# on #header#">


</cfstoredproc>


</cffunction>


</cfcomponent>

Can someone point me the right direction on making this onMessage method work?

1

There are 1 answers

0
Nitish Pandey On

For me my logs don't give any error. They do say things like:

17/12/14 10:30.14: [email protected]; Topic=topic; Time=1ms

And there is nothing in the error log to indicate an error in processing the message too.

But whatever I am doing in there is not happening. I am for instance doing this:

   public anyfunction onMessage(Message,Header) output="true" {
     FileWrite( "/Users/nitish/Documents/Nitish/Official/Tomcat/apache-tomcat-8.0.14/webapps/obd/mmm/messagebroker/files/test.txt", "ha" ,"UTF-8");
     return;
   }