FluorineFx.NET

Configuring Message Service

A Message Service destination is the endpoint that encapsulates the server-side code where messages are delivered. You connect to a message service destination using Producer and Consumer components and the corresponding ActionScript API.

Sample:

<service id="message-service" class="flex.messaging.services.MessageService" messageTypes="flex.messaging.messages.AsyncMessage">
<adapters>
    <adapter id="chat" class="ServiceLibrary.ChatAdapter" default="true"/>
</adapters>

<destination id="chat">
    <channels>
        <channel ref="my-rtmp"/>
    </channels>
    <properties>
        <network>
            <session-timeout>20</session-timeout>
        </network>
        <server>
            <allow-subtopics>true</allow-subtopics>
        </server>
        <security>
            <security-constraint ref="privileged-users"/>
        </security>
    <properties>
</destination>
</service>
...
<security>
    <security-constraint id="privileged-users">
        <auth-method>Custom</auth-method>
        <roles>
            <role>privilegedusers</role> 
            <role>admins</role>
        </roles> 
    </security-constraint>
</security>
... 
<channels>
    <channel-definition id="my-rtmp" class="mx.messaging.channels.RTMPChannel">
        <endpoint uri="rtmp://{server.name}:1951" class="flex.messaging.endpoints.RTMPEndpoint"/>
    </channel-definition>
</channels>
...
				

Security

Use a security constraint to authenticate and authorize users before allowing them to access a destination (custom authentication supported only).

Security constraints can be declared inline in the destination definition or globally and referenced by their id in a destination definition.

 

Message channels

FluorineFx supports Realtime Message Protocol (RTMP/RTMPT) channel and AMF Channel with polling for messaging.

 

Message Service adapters

The default Message Service adapter in FluorineFx is provided by the FluorineFx.Messaging.Services.Messaging.MessagingAdapter class.

    <adapter id="dotnet" class="FluorineFx.Messaging.Services.Messaging.MessagingAdapter" default="true"/>

You can provide your own Adapter class by overriding the MessagingAdapter class.

 

Network properties

Property element Description

session-timeout

Idle time in minutes before a subscriber is unsubscribed (Missing element or the value 0 means do not unsubscribe automatically)

 

Server properties

Property element Description

allow-subtopics

Specifies whether subtopics are allowed for a destination (true/false)

subtopic-separator

Not supported. In FluorineFx the subtopic separator is always "." (period)