Both the "Data Provider" and the "Data Adapter" are custom components.
According to Figure 2, the Data Adapter is a java class written by you, which communicates with the Data Provider (which represents some existing back-end process).
Hence, the way the two parts communicate should depend on the interface offered by the Data Provider. The Data Adapter should obey this interface and "adapt" it to the
interface offered by Lightstreamer Server.
On the other hand, if you consider the Generic Adapter SDK, then you refer to a different architecture, shown in the
"Adapter Remoting Infrastructure" document, which is a special case of the basic architecture.
In this case, you don't have to add a custom java class to Lightstreamer Server, but you have to setup a remote process which connects to Lightstreamer Server based on the specifications of the ARI protocol.
Then your process is free to communicate with the back-end, but then it should "adapt" the communication to the ARI protocol requirements.
Two ways to achieve the same goal; so you can choose based on your convenience.
That said, please clarify the part of your question related with the Metadata Adapter.
About the second question, if you have "one client only" and need to create "another api", that uses sendMessage, my understanding is that you need to use two LightstreamerClient objects in the same client application or page, which will open two sessions.
This is allowed.
This is not the "best choice", because, if you are bound to "one client only", then keeping the existing LightstreamerClient and integrating the sendMessage on it would be better.
But, as you say "I dont want to modify my api source code", using a second LightstreamerClient objects is still a legal choice.
But please clarify the client environment and the LS SDK in use, to add some context.