Unfortunately the BlazeDS subscription management code is a total mess. It's
actually so bad that I've tried fixing things several times, but got stuck in
that messy code that deep, that I decided to completely drop that code and
rewrite it. Unfortunately that's a lot of work, but probably less than fixing
it.
I noticed the same problem as you are reporting and found out that if you set
the client-timeout in the services-config this actually turns on the
subscription tracking ... unfortunately I had to disable it again as it wasn't
working right:
I used this to turn stuff on:
<flex-client>
<!-- Make sure clients are automatically expired -->
<timeout-minutes>5</timeout-minutes>
</flex-client>
But as I said ... it doesn't really work as the timeout,
subscription-expiration code is a total mess. If you are feeling that you want
to get involved in fixing this, feel free to do so and I'll do my best to help
you. But till I'm going to start working on this will be quite a while as I
need to re-activate my fun on Flex by not continuosly cleaning up the mess in
Adobe code ...
Chris
________________________________________
Von: liugogal <[email protected]>
Gesendet: Dienstag, 15. Dezember 2015 01:48
An: [email protected]
Betreff: Blazeds 4.7.2
mxml:
<s:ChannelSet id="cs">
<s:AMFChannel
uri="http://localhost:8080/TestWeb1/messagebroker/amflongpolling"/>
<s:AMFChannel
uri="http://localhost:8080/TestWeb1/messagebroker/amfpolling"/>
</s:ChannelSet>
<s:Producer id="producer" destination="chat" channelSet="{cs}"
channelConnect="producer_channelConnectHandler(event)"
channelDisconnect="producer_channelDisconnectHandler(event)"
channelFault="producer_channelFaultHandler(event)"
acknowledge="producer_acknowledgeHandler(event)"/>
<s:Consumer id="consumer" destination="chat" channelSet="{cs}"
message="messageHandler(event.message)"
channelConnect="producer_channelConnectHandler(event)"
channelDisconnect="producer_channelDisconnectHandler(event)"
channelFault="producer_channelFaultHandler(event)"/>
messaging-config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<service id="message-service"
class="flex.messaging.services.MessageService">
<adapters>
<adapter-definition id="actionscript" class="com.gogal.MyAdapter"
default="true" />
</adapters>
<default-channels>
<channel ref="my-polling-amf"/>
</default-channels>
<destination id="chat"/>
</service>
MyAdapter:
...
public Object invoke(Message message)
{
SubscriptionManager subscriptionManager
=((MessageDestination)getDestination()).getSubscriptionManager();
Set<String> subs = messageService.getSubscriberIds(message, true);
System.out.println(subs);
}
...
But But But But But But the subs's lenth is 0;
Who can give me a hand,thank you!
--
View this message in context:
http://apache-flex-users.2333346.n4.nabble.com/Blazeds-4-7-2-tp11664.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.