Configuring Hubs and Namespaces in Azure Notification Hub - xamarin.forms

We have different bundle ids for public and Enterprise versions of our xamarin forms app and it has both android and iOS versions. What would be the recommended configuration of namespaces and hubs. Would the below approach work?
Public App
Namespace 1 - Hub 1 - Dev
Namespace 1 - Hub 2 - Prod
Enterprise App (distributed through MDM)
Namespace 2 - Hub 3 - Dev
Namespace 2 - Hub 4 - Prod

Related

Azure App service - .Net Core - Failed to start application /LM/W3SVC/###/ROOT, ErrorCode "0x800700c1"

After deploying to a newly created Azure App Service, I get this error:
HTTP Error 500.0 - ANCM In-Process Handler Load Failure
eventlog.xml shows these two lines:
<Data>Failed to start application '/LM/W3SVC/1773510456/ROOT', ErrorCode '0x800700c1'.</Data>
And
<Data>Could not find inprocess request handler. Captured output from invoking hostfxr: </Data>
I am deploying a 64 bit Web Api (<RuntimeIdentifier>win-x64</RuntimeIdentifier> inside the csproj).
Googling the errors reveals that it's related to a 64bit/32bit mismatch. Azure App Service is set to 32 bit, this needs to be changed. Copied and modified from AspNetCore.Docs Issue 13013 :
Azure App Service does have both the 32- and 64-bit runtimes available
since .NET Core 2.2 was released. To set the Platform to 64
Bit, go to the App Service > Configuration > General settings > Platform settings > Platform > 64 bit. Note that you need to have a Basic or higher service app plan.

How to setup rebus to handle messages from third party vendor

We currently use Rebus and we have a shared project that holds the command messages (payloads, etc).
Both the client and the bus projects reference this shared "messages" project. When the client sends a message to the bus, the bus knows how to handle it because it has references to the same namespace:
To illustrate, we have 3 projects:
project.rebus.bus
project.rebus.messages (command messages)
project.rebus.client
Solution1 - bus
project.rebus.bus
PingHandler<Ping>
project.rebus.messages (Ping message)
Solution2 - client
project.rebus.client
bus.send(new Ping {...})
project.rebus.messages (Ping message)
The scenario works because both project.rebus.bus and project.rebus.client share the same project.rebus.messages, all good.
How do we setup project.rebus.bus, when it needs to handle messages from a third party vendor, where we can't have a shared project.rebus.messages project?
Is it possible?
Example:
Our rebus bus - bus
project.rebus.bus
ThirdPartyTestHandler<ThirdPartyTestMessage>
project.rebus.messages (ThirdPartyTestMessage message)
Third party vendor - client
SomeCompanyOutThere.rebus.client
bus.send(new ThirdPartyTestMessage {...})
SomeCompanyOutThere.rebus.messages (ThirdPartyTestMessage message)
Thanks!
It's pretty common to see projects where the messages assemblies are distributed as NuGet packages.
This way, the "owner" of the message types (i.e. the app with the handlers if it's commands, we're talking about, or the app that publishes the events if it's events we're talking about) can have the project in its solution, and then a NuGet package can be built from it.
All other apps (which then become "clients" in this particular relationship) can then include that NuGet package and this way get access to the message types.
I suggest you do the same with the 3rd party assembly, if you intend to use that as messages.

Spring Integration: JDBC single query to web service

I would like to know the way for resolving this integration scenario:
Execute different queries to select X elements from a database. I am
looking for an inbound adapter without pooling because it is just
necessary to execute the query once. Although, results of the queries
will be generate only one output.
Work with this data to build a SOAP request (generic web service)
Send this SOAP request to a web service and wait for an asynchronous response.
But also, it is necessary to deploy all this scenario in a WAR file on Tomcat server. I am deploying the application from a spring MVC + spring integration skeleton but I will not have any controller. Is it possible to execute the application when context was loaded on Tomcat?
I am working with the next technologies:
Spring integration
Spring MVC for a WAR deployment
Scheduling (Quartz or #Scheduled)
Spring WS
Regards
Since you say that you'd prefer to select on the application start up and only once, you can use:
<int-event:inbound-channel-adapter channel="jdbcChannel"
event-types="org.springframework.context.event.ContextRefreshedEvent"
payload-expression="''"/>
and <int-jdbc:outbound-gateway query="SELECT * FROM ..."/>
And so on to the WebService.
UPDATE
Since you say that you are around Anotation configuration, consider to use Spring Integration Java DSL.
To configure <int-event:inbound-channel-adapter> from #Configuration you should do this:
#Bean
#SuppressWarnings("unchecked")
public MessageProducer ApplicationEventListeningMessageProducer() {
ApplicationEventListeningMessageProducer producer = new ApplicationEventListeningMessageProducer();
producer.setEventTypes(ContextRefreshedEvent.class);
producer.setPayloadExpression("''");
producer.setOutputChannel(jdbcChannel());
return producer;
}
ContextRefreshedEvent info you can get from its JavaDocs or from Spring Framework Manual.

Grunt+Bower: dependency to another local project

I have two local Grunt+Bower-projects with typical build and watch/serve tasks:
Client contains the client to be publicly released
AdminClient is an extension to client intended for internal administration use
AdminClient should re-use Client code and build-result. watch/serve must behave transparently for any change in Client and AdminClient.
How can I do this with Grunt+Bower?
It is a basic problem solved in C# with project dependency and in java typically with maven sub-modules.
You can have the Client configuration in a separate file that you extend in the AdminClient.
var common = require("common.js");
...
grunt.initConfig(common.config);

WCF Publish Method Procedure

I am working with .net WCF. I have made WCF application and made web based application in .net to use WCF service:
public class AdditionWCF : IAdditionWCF
{
public void DoWork()
{
}
public int AdditionResult(int a, int b)
{
int res = 0;
res = a + b;
return res;
}
}
both are working properly in local host. Now I want to publish both this application.
When I try to publish it, it gives me error like this:
I suppose you publish your applicaiton via the Publish command.
There are in fact many Publish methods:
- Web Deploy
- Web Deploy Package
- FTP
- FileSystem
In your example, it seems you selected"Web Deploy".
Web Deploy is the recommended publish method because it can automate the widest range of deployment tasks. However, before choosing this method, make sure that the hosting provider or server that you are deploying to supports Web Deploy.
At first, make sure that the remote server is set up for the Web Deployment Agent Service (MSDepSvc, also known as Remote Agent service), and that you have administrative rights on the destination server. Read instructions here.
You simply need to specify server name and application path.
At the end, maybe web deploy is not the good approach in your case.

Resources