Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

When to use AMF and when to use RTMP??

Avatar

Level 2
Hello can someone explain the difference??



I am using all the defaults for the configurations files
(remoting and datamanagement) and my app works perfectly on
development mode where everything is on localhost, but when we try
it on pre-production it keeps throwing an error saying that it
couldn't connect to the RTMP channel. The only thing that changes
between these two modes is that on development i access everything
on localhost and on pre-production we point to another server.



I am totally clueless why this is happening, i am bit
confused why data-management uses RTMP and why remoting uses AMF,
so if anyone could explain it to me it would be great.



Thanks
1 Accepted Solution

Avatar

Correct answer by
Level 4
There's no special reason why one uses RTMP vs. AMF. Data
management service can also use AMF and Remoting can also use RTMP.
The only real requiement is that Data management service needs to
be able to receive updates from the FDS/LCDS server. This can be
achieved by using a channel that is capable of receiving pushed
updates from the server (eg. RTMP) or a channel that is capable of
polling for updates on the server (i.e. AMF-polling). Therefore,
when you use AMF with Data management service, you need to have
polling enabled with a polling interval.



In terms of why AMF works but RTMP doesn't is that AMF
channel uses AMF format over the HTTP protocol whereas RTMP channel
uses simple TCP socket (and not HTTP). Therefore in some
environments, RTMP will be blocked by the firewalls but AMF won't
since it's like regular HTTP traffic. In this case, you can use AMF
polling instead or use RTMPT which is new in LCDS 2.5.

View solution in original post

0 Replies

Avatar

Correct answer by
Level 4
There's no special reason why one uses RTMP vs. AMF. Data
management service can also use AMF and Remoting can also use RTMP.
The only real requiement is that Data management service needs to
be able to receive updates from the FDS/LCDS server. This can be
achieved by using a channel that is capable of receiving pushed
updates from the server (eg. RTMP) or a channel that is capable of
polling for updates on the server (i.e. AMF-polling). Therefore,
when you use AMF with Data management service, you need to have
polling enabled with a polling interval.



In terms of why AMF works but RTMP doesn't is that AMF
channel uses AMF format over the HTTP protocol whereas RTMP channel
uses simple TCP socket (and not HTTP). Therefore in some
environments, RTMP will be blocked by the firewalls but AMF won't
since it's like regular HTTP traffic. In this case, you can use AMF
polling instead or use RTMPT which is new in LCDS 2.5.

Avatar

Level 2
Thanks for the explanation.



We checked the firewall and the default RTMP port 2038 isn't
blocked, so is there any other reason that will make the channel
error appear???



We are using Christopher Coenraets' Spring Factory, could
that be causing the error?


http://coenraets.org/flex-spring



Avatar

Level 4
I can't think of anything else with the limited information
provided here. I'd turn debug logging on and see if there are any
RTMP related errors as the LCDS (more specifically RTMP server)
starts. I don't think Spring factory might be causing this but to
eliminate that possibility, you can write a very simple messaging
example with one Consumer and one Producer that talks to a
messaging destination that uses an RTMP channel and see if you can
send/receive message using RTMP.

Avatar

Level 2
So we fixed, not very sure what it was, maybe someone screwed
up some config file, anyways thanks a lot for the explanation 🙂



Avatar

Not applicable
Be sure that the port configured for each RTMP channel is
unique for the

entire server to avoid collisions. It's not uncommon for
people to

deploy two flex.war files on a server and forget that they've
used the

same port in both applications.