Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
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
Former Community Member
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

5 Replies

Avatar

Correct answer by
Former Community Member
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

Former Community Member
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

Former Community Member
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.

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----