RabbitMQ custom table source and sink for pyflink 1.11 - rabbitmq

According to the docs here:
https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/connectors/
and
https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/connectors/
is it possible to create a custom ddl RabbitMQ connector to be used in pyflink TABLE API 1.11?
how?

Firstly, you need to implement your custom connector implementation based on the interface provided by Java. Then you need to use the API or command line parameters to refer to the jar used which you can refer to
https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/python/common_questions.html#adding-jar-files

Related

Facing problem while migrating API from mule 3 to mule 4

In my case, I'm doing a migration from Mule 3 to Mule 4.
I have some questions regarding the manual migration from Mule 3 to Mule 4.
How to use the expression component in Mule 4?
Are there any other ways to use session variables?
In Mule 3, I used an expression component to return Java code to my logic. I'd like to reuse that Java code in Mule 4.
The message enricher component is not supported in Mule 4.
Mule 4 does not support transformers such as DOM to XML, XML to String, and so on.
Please assist me.
Several of the questions asked are already explained in the Migration Guide.
How to use the expression component in Mule 4?
In Mule 4 the expression language is DataWeave 2. You should learn about DataWeave and read the migration guide from MEL to DataWeave.
Are there any other ways to use session variables?
No. This is mentioned in the migration guide Migrating Core Components: "Session variables have been removed. Users must explicitly pass headers across transport boundaries."
In Mule 3, I used an expression component to return Java code to my logic. I'd like to reuse that Java code in Mule 4.
You can call Java static methods directly from DataWeave. Also you can execute any Java method with the Java Module and store the output in a variable to be used in a DataWeave script.
Additionally you can create custom functions to add to DataWeave using the Mule SDK.
Note that in Mule 4 you should not use any Mule APIs in your Java code.
Generally speaking try to see if you can use pure DataWeave features before trying to call Java code.
The message enricher component is not supported in Mule 4.
There is no need for the enricher. Mule 4 can use target variables in any operation. This is mentioned in the migration guide.
Mule 4 does not support transformers such as DOM to XML, XML to String, and so on.
That's right. You should use DataWeave Transformations instead of transformers. Yet another topic mentioned in the migration guide.

Spring Auto REST Docs + Spring Data REST? HATEOAS?

I really like the idea of using Javadoc comments for auto-generating REST Docs!
Huge parts of our REST API are automatically generated by Spring Data REST (by adding #RepositoryRestResource to Repositories). It would be great if REST Docs could also be generated for these - that would be a very high degree of automatition.
But unfortunately most "auto-"snippets are "empty" (e.g. auto-response-fields.adoc only contains a list of links[]-Attributes). I guess the reason could be that the REST Controllers are probably created dynamically by Spring Data REST. Currently I do not see how to re-use the Javadoc comments for them.
Is there any way to auto-generate REST Docs for such REST APIs that are provided by Spring Data REST?
It would even be helpful to manually tell Spring Auto REST Docs which classes are used in requests and responses instead of letting it discover it statically - is that possible?
And we also add HATEOAS "_links" to most response Resources (by providing ResourceProcessors as Beans). These links contain "title"s which are used by Spring REST Docs - if we list all of them with HypermediaDocumentation.linkWithRel(...). This is a bit redundant, and it would be nice if all the _links with "title"s could be processed automatically. (But this can be done by listing all of them in some extra code, so it is not as bad as with Spring Data REST.)
If necessary, I could also create an example project for what I am talking about.
Answer to the question whether one can manually tell Spring Auto REST Docs which classes to use for the documentation:
Spring Auto REST Docs allows to specify the request and response classes to use for the documentation. This can be done with requestBodyAsType and responseBodyAsType. In a test it looks like this:
.andDo(document("folderName",
requestFields().requestBodyAsType(Command.class),
responseFields().responseBodyAsType(CommandResult.class)));
This is from a test in the example project.

How to write custom connector for Facebook Presto?

I have setup Presto with mysql connector enabled.
Now I want to write my own connector for a special type of data source.
Custom connector for SQLAlchemy is done. But this time, I am facing dozens of Java classes. What base classes can be used as good starting point? Which interfaces must be implemented? Maybe RawFile connector?
Thank you in advance.
See the developer documentation: https://prestodb.io/docs/current/develop/connectors.html. The example HTTP connector is a good starting point.
You need to implement ConnectorFactory, Connector, ConnectorMetadata,
ConnectorSplitManager, ConnectorHandleResolver, and either ConnectorRecordSetProvider or ConnectorPageSourceProvider at the minimum, other classes may be needed depending on what you want to do.

Use Mule message properties in MMC alert

Is it possible to use mule message properties (like payload and flowvars) in a Mule Management Console notification body or subject?
I think it's not possible.
You can only use the properties exposed by mule, as explained here:
http://www.mulesoft.org/documentation/display/current/Defining+SLAs+and+Alerts#DefiningSLAsandAlerts-PropertiesUsedinAlertExpressions
Maybe using a Management Script, but there is no much info about it (the links to the javadoc are broken)
http://www.mulesoft.org/documentation/display/current/Scripting+Examples#ScriptingExamples-AlertingExamples
Yes you can use it. Mule provide various properties common to all alerts from class com.mulesoft.console.alert.RaisedAlert that can be used in defining the certain values such as
Flow identifier
Flow name
You may refer to mule documentation for it
https://docs.mulesoft.com/mule-management-console/v/3.7/defining-slas-and-alerts#DefiningSLAsandAlerts-PropertiesUsedinAlertExpressions

WSO2 ESB Custom Message Processor example

I'm planning to create a custom message processor to pick up messages from message store. However I haven't find any examples how to create a custom class. Documentation under this topic is very limited.(http://docs.wso2.org/display/ESB481/Custom+Message+Processor). Can somebody provide example to create custom message processor ?
Thanks,
Have a look at the MessageProcessor interface - and the implementations and other classes here. Once you have your processor setup, you can place your jars in the lib folder. Then follow the instructions in the link you posted in the OP.