Hi everyone,

I'm struggling with the Messaging functionality of Weborb 3.0 PHP when
trying to use subtopic or subqueue. I get the Messaging Demo running
fine but I cannot create and subscribe to subtopics of a destination.

I am trying to generate subtopics according to a pair of users link in
a simple instant msgr and only receive the corresponding messages.

This is the code that gives me the following error:

FLEX CODE ____________________________________________________________

var cs:ChannelSet= new ChannelSet();
var uri:String = ServerConfig.getChannel("my-polling-amf").uri;
var channel:WeborbMessagingChannel = new WeborbMessagingChannel("com",
uri );
channel.addEventListener( MessageEvent.MESSAGE, handle_gotComMessage );
cs.addChannel( channel );

mm.comProducer = new WeborbProducer( "ChatDestination" );
mm.comProducer.channelSet = cs;
mm.comProducer.destination = "ChatDestination";
mm.comProducer.subqueue = "com";
mm.comProducer.addEventListener(MessageAckEvent.ACKNOWLEDGE,
onMessageAck);
mm.comProducer.addEventListener(MessageFaultEvent.FAULT, onMessageFault);
mm.comProducer.send(new AsyncMessage("init-test"));


var cs2:ChannelSet= new ChannelSet();
var uri2:String = ServerConfig.getChannel("my-polling-amf").uri;
var channel2:WeborbMessagingChannel = new
WeborbMessagingChannel("com", uri2 );
cs2.addChannel( channel );

mm.comConsumer = new WeborbConsumer(  );
mm.comConsumer.channelSet = cs2;
mm.comConsumer.destination = "ChatDestination";
mm.comConsumer.subqueue = "com";

mm.comConsumer.subscribe();


ERROR ____________________________________________________________

[MessageFaultEvent faultCode="Client.Error.MessageSend"
faultDetail="Channel.Connect.Failed error The application name
specified during connect is invalid." faultString="Send failed"
rootCause=[ChannelFaultEvent faultCode="Channel.Connect.Failed"
faultString="error" faultDetail="The application name specified during
connect is invalid." channelId="com" type="channelFault" bubbles=false
cancelable=false eventPhase=2] type="fault" bubbles=false
cancelable=false eventPhase=2]


messaging-config.xml _________________________________________________

<?xml version="1.0" encoding="UTF-8"?>
<service id="message-service"
    class="flex.messaging.services.MessageService"
    messageTypes="flex.messaging.messages.AsyncMessage">

    <destination id="ChatDestination">
        <properties>
        
            <server>
                <durable>false</durable>
                <allow-subtopics>true</allow-subtopics>
                <subtopic-separator>.</subtopic-separator>
            </server>
            
           
<message-service-handler>Weborb.messaging.v3.MessagingServiceHandler</message-service-handler>
           
<message-storage-policy>Weborb.messaging.v3.MemoryStoragePolicy</message-storage-policy>
            <!-- working?
<deliverPastMessages>+1</deliverPastMessages> -->
        </properties>

        <channels>
            <channel ref="my-polling-amf"/>             
        </channels>         
        
    </destination>
</service>


THIS IS WORKING THOUGH _______________________________________________

mm.chatProducer = new WeborbProducer( "ChatDestination" );
mm.chatConsumer = new WeborbConsumer( "ChatDestination" );
mm.chatConsumer.addEventListener( MessageEvent.MESSAGE,
handle_gotMessage );
mm.chatConsumer.subscribe();

______________________________________________________________________


Thanks for any advice. If i can't solve the issue I'm gonna have to
subscribe to everything and sort out messages in my code with some
header information. But I would prefer not to have all the additional
traffic. It wouldn't be much of a security issue for my application
though.

regards Thomas



Reply via email to